-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ESLint is a major update which required a new configuration file format as well as using an 8.0.0 alpha version of @typescript-eslint. Also fixed all violations reported by updated ESLint and Prettier.
- Loading branch information
Showing
19 changed files
with
289 additions
and
271 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import tsParser from '@typescript-eslint/parser'; | ||
import path from 'node:path'; | ||
import { fileURLToPath } from 'node:url'; | ||
import js from '@eslint/js'; | ||
import { FlatCompat } from '@eslint/eslintrc'; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
allConfig: js.configs.all | ||
}); | ||
|
||
export default [ | ||
{ | ||
ignores: [ | ||
'dist/*', | ||
'coverage/*', | ||
'build*/*', | ||
'**/*.d.ts', | ||
'src/public/', | ||
'src/types/', | ||
'regression/output*', | ||
'**/generated' | ||
] | ||
}, | ||
...compat.extends('plugin:@typescript-eslint/recommended', 'prettier'), | ||
{ | ||
languageOptions: { | ||
parser: tsParser, | ||
ecmaVersion: 2018, | ||
sourceType: 'module' | ||
}, | ||
|
||
rules: { | ||
semi: ['error', 'always'], | ||
|
||
quotes: [ | ||
'error', | ||
'single', | ||
{ | ||
avoidEscape: true | ||
} | ||
], | ||
|
||
'@typescript-eslint/ban-ts-comment': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-unsafe-declaration-merging': 'off' | ||
} | ||
} | ||
]; |
Oops, something went wrong.