-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
41 lines (41 loc) · 1.02 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
/**
* An object with ESLint options.
*
* WARNING
* "Failed to load plugin '@typescript-eslint' declared in '..\.eslintrc.js': Cannot find module 'eslint/use-at-your-own-risk'"
* Solution: IntelliJ didn't pick the current node version from nvm. So it ran with an outdated node version (12 instead of 16) resulting in the error. Use the shell.
*
* @type {import('eslint').Linter.Config}
*/
module.exports = {
root: true,
env: {
node: true,
jest: true,
browser: true
},
extends: [
'eslint:recommended',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2021,
},
plugins: [
'@typescript-eslint'
],
rules: {
//typescript ! necessari secondo me
'@typescript-eslint/no-non-null-assertion': 'off',
// ok tabs, fixare un giorno
'prettier/prettier': [0, {
"useTabs": false
}]
}
};