This repository has been archived by the owner on Jun 28, 2024. It is now read-only.
generated from vasilionjea/webpack-frontend-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
70 lines (67 loc) · 1.78 KB
/
.eslintrc.cjs
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
// https://eslint.org/docs/latest/user-guide/configuring/configuration-files
// https://json.schemastore.org/eslintrc
module.exports = {
root: true,
env: {
es6: true,
browser: true,
node: true,
jest: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
parserOptions: {
tsconfigRootDir: __dirname,
sourceType: 'module',
},
// Project-specific rules
rules: {
"block-scoped-var": "error",
"eqeqeq": "error",
"no-var": "error",
"prefer-const": "error",
"eol-last": "error",
"prefer-arrow-callback": "error",
"no-trailing-spaces": "error",
"quotes": ["warn", "single", { "avoidEscape": true }],
},
overrides: [
{
files: ['src/**/*.ts'],
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
sourceType: 'module',
},
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking'
],
rules: {
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
},
},
{
files: ['test/**/*.ts'],
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./test/tsconfig.json'],
sourceType: 'module',
},
extends: [
'plugin:@typescript-eslint/recommended',
],
rules: {
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
},
},
],
};