-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy patheslint.config.js
More file actions
43 lines (42 loc) · 1.23 KB
/
eslint.config.js
File metadata and controls
43 lines (42 loc) · 1.23 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
import borgarLint from '@borgar/eslint-config';
import eslint from '@eslint/js';
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default tseslint.config(
{
files: [
'**/*.js',
'**/*.ts',
'**/*.mjs',
],
ignores: [
'dist/*',
],
languageOptions: {
globals: { ...globals.browser },
parserOptions: { projectService: { allowDefaultProject: [ 'eslint.config.js' ] } },
},
},
eslint.configs.recommended,
tseslint.configs.recommendedTypeChecked,
tseslint.configs.stylisticTypeChecked,
borgarLint.config.recommended,
borgarLint.config.stylistic({
commaDangle: true,
singleBlocks: true,
lineLength: 120,
}),
{
rules: {
// next 2 rules are brittle and not really doing much that TS isn't already doing
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
'@typescript-eslint/no-redundant-type-constituents': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'no-use-before-define': 'error',
'no-labels': 'error',
'no-restricted-syntax': [ 'error', 'SwitchStatement' ],
'no-shadow': [ 'error', { builtinGlobals: false } ],
},
},
);