-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy patheslint.config.js
33 lines (31 loc) · 902 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
import pkg from '@eslint/js'
import typescriptParser from '@typescript-eslint/parser'
import typescriptEslintPlugin from '@typescript-eslint/eslint-plugin'
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
import globals from 'globals'
const { configs } = pkg
export default [
configs.recommended,
eslintPluginPrettierRecommended,
{ ignores: ['**/*.js', 'node_modules'] },
{
files: ['src/**/*.ts'],
languageOptions: {
globals: {
...globals.browser,
...globals.node,
NodeListOf: false,
},
sourceType: 'module',
parser: typescriptParser,
},
plugins: {
'@typescript-eslint': typescriptEslintPlugin,
},
rules: {
'no-inner-declarations': 'off',
'no-unused-vars': 'warn',
// 'no-var': 'off', // Note: Disabled due to issues with target ES5, consider ES2020
},
},
]