generated from tjx666/vscode-extension-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
109 lines (103 loc) · 2.98 KB
/
.eslintrc.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
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
const { resolve } = require;
const OFF = 0;
const ERROR = 2;
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
env: {
browser: true,
es2022: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
'plugin:unicorn/recommended',
'prettier',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 13,
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'react', 'jsx-a11y'],
settings: {
react: {
version: 'detect',
},
'import/resolver': {
node: {
extensions: ['.ts', '.tsx', '.js', '.json'],
},
typescript: {
project: [
resolve('./src/tsconfig.json'),
resolve('./scripts/tsconfig.json'),
resolve('./test/tsconfig.json'),
resolve('./web/tsconfig.json'),
],
},
},
},
rules: {
'@typescript-eslint/ban-ts-comment': OFF,
'@typescript-eslint/no-empty-function': OFF,
'@typescript-eslint/no-empty-interface': OFF,
'@typescript-eslint/no-explicit-any': OFF,
'@typescript-eslint/no-non-null-assertion': OFF,
'@typescript-eslint/no-unused-vars': OFF,
'@typescript-eslint/explicit-function-return-type': OFF,
'@typescript-eslint/ban-types': OFF,
'unicorn/consistent-function-scoping': OFF,
'unicorn/filename-case': OFF,
'unicorn/import-style': OFF,
'unicorn/no-abusive-eslint-disable': OFF,
'unicorn/no-array-for-each': OFF,
'unicorn/no-null': OFF,
'unicorn/no-process-exit': OFF,
'unicorn/prefer-module': OFF,
'unicorn/prefer-node-protocol': OFF,
'unicorn/prevent-abbreviations': OFF,
'unicorn/text-encoding-identifier-case': OFF,
'func-names': OFF,
'max-classes-per-file': OFF,
'no-bitwise': OFF,
'no-console': OFF,
'no-param-reassign': OFF,
'no-plusplus': OFF,
'no-unused-expressions': OFF,
'import/extensions': OFF,
'react/self-closing-comp': [
ERROR,
{
component: true,
html: true,
},
],
},
overrides: [
{
files: ['test/**/*.ts'],
rules: {
'import/prefer-default-export': OFF,
},
},
{
files: ['scripts/**/*.ts'],
rules: {
'import/no-extraneous-dependencies': OFF,
},
},
],
};