-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build: migrate eslint v9 * chore: fmt * 🤖 Documentation auto-update --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
3d42497
commit 3fc07f0
Showing
6 changed files
with
1,989 additions
and
1,295 deletions.
There are no files selected for viewing
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
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,48 @@ | ||
import {FlatCompat} from '@eslint/eslintrc'; | ||
import js from '@eslint/js'; | ||
import typescriptEslint from '@typescript-eslint/eslint-plugin'; | ||
import tsParser from '@typescript-eslint/parser'; | ||
import globals from 'globals'; | ||
import path from 'node:path'; | ||
import {fileURLToPath} from 'node:url'; | ||
|
||
// eslint-disable-next-line no-redeclare | ||
const __filename = fileURLToPath(import.meta.url); | ||
// eslint-disable-next-line no-redeclare | ||
const __dirname = path.dirname(__filename); | ||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
allConfig: js.configs.all | ||
}); | ||
|
||
export default [ | ||
{ | ||
ignores: [ | ||
'**/dist/', | ||
'**/jest.config.js', | ||
'**/*.spec.ts', | ||
'**/*.test.ts', | ||
'**/mock.ts', | ||
'bin/index.js' | ||
] | ||
}, | ||
{languageOptions: {globals: globals.node}}, | ||
...compat.extends('eslint:recommended', 'plugin:@typescript-eslint/recommended'), | ||
{ | ||
plugins: { | ||
'@typescript-eslint': typescriptEslint | ||
}, | ||
languageOptions: { | ||
parser: tsParser, | ||
ecmaVersion: 5, | ||
sourceType: 'script', | ||
parserOptions: { | ||
project: ['./tsconfig.eslint.json'] | ||
} | ||
}, | ||
rules: { | ||
'@typescript-eslint/consistent-type-imports': 'error' | ||
} | ||
} | ||
]; |
Oops, something went wrong.