-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
35 lines (34 loc) · 985 Bytes
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// eslint.config.js
const { ESLint } = require('eslint');
const typescriptPlugin = require('@typescript-eslint/eslint-plugin');
const typescriptParser = require('@typescript-eslint/parser');
const prettierPlugin = require('eslint-plugin-prettier');
module.exports = [
{
files: ['src/**/*.{ts,js}'],
ignores: ['node_modules', 'dist'],
languageOptions: {
parser: typescriptParser,
ecmaVersion: 2020,
sourceType: 'module',
},
plugins: {
'@typescript-eslint': typescriptPlugin,
prettier: prettierPlugin,
},
rules: {
...prettierPlugin.configs.recommended.rules,
...typescriptPlugin.configs.recommended.rules,
'@typescript-eslint/explicit-function-return-type': 'warn',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
'prettier/prettier': 'error',
},
settings: {
node: true,
es6: true,
},
},
];