Migrate ESLint to flat config format (v9) and update CI workflow
This commit is contained in:
39
eslint.config.js
Normal file
39
eslint.config.js
Normal file
@@ -0,0 +1,39 @@
|
||||
const js = require('@eslint/js');
|
||||
const parser = require('@typescript-eslint/parser');
|
||||
const plugin = require('@typescript-eslint/eslint-plugin');
|
||||
const prettierPlugin = require('eslint-plugin-prettier');
|
||||
const prettierConfig = require('eslint-config-prettier');
|
||||
|
||||
module.exports = [
|
||||
js.configs.recommended,
|
||||
prettierConfig,
|
||||
{
|
||||
files: ['**/*.ts'],
|
||||
languageOptions: {
|
||||
parser: parser,
|
||||
parserOptions: {
|
||||
project: './tsconfig.json',
|
||||
sourceType: 'module',
|
||||
},
|
||||
globals: {
|
||||
node: true,
|
||||
jest: true,
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
'@typescript-eslint': plugin,
|
||||
prettier: prettierPlugin,
|
||||
},
|
||||
rules: {
|
||||
...plugin.configs.recommended.rules,
|
||||
'@typescript-eslint/interface-name-prefix': 'off',
|
||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'prettier/prettier': 'error',
|
||||
},
|
||||
},
|
||||
{
|
||||
ignores: ['dist/**', 'node_modules/**', 'coverage/**'],
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user