-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy patheslint.config.js
More file actions
60 lines (59 loc) · 1.52 KB
/
eslint.config.js
File metadata and controls
60 lines (59 loc) · 1.52 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
const tsParser = require('@typescript-eslint/parser')
const tsPlugin = require('@typescript-eslint/eslint-plugin')
const importPlugin = require('eslint-plugin-import')
const prettierPlugin = require('eslint-plugin-prettier')
const globals = require('globals')
module.exports = [
{
ignores: ['**/dist', '**/node_modules', '**/.*', '**/*.d.ts', '.husky/'],
},
{
files: ['src/**/*.{js,ts}'],
},
{
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
globals: {
...globals.browser,
...globals.es2021,
describe: true,
it: true,
after: true,
before: true,
afterEach: true,
beforeEach: true,
__BUILD__: true,
__DEV__: true,
__SIT__: true,
__UAT__: true,
__PROD__: true,
},
},
plugins: {
'@typescript-eslint': tsPlugin,
import: importPlugin,
prettier: prettierPlugin,
},
rules: {
'prettier/prettier': 'error',
'no-console': 'off',
semi: ['warn', 'never'],
quotes: ['warn', 'single'],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-expressions': ['error', { allowShortCircuit: true, allowTernary: true }],
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
},
]