@voiceflow/eslint-config 3.2.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +1 -1
- package/config/base.js +9 -2
- package/config/import.js +1 -0
- package/package.json +25 -27
- package/typescript.js +14 -0
- package/utility.js +0 -3
package/.eslintrc.js
CHANGED
package/config/base.js
CHANGED
|
@@ -6,10 +6,12 @@ module.exports = {
|
|
|
6
6
|
'plugin:eslint-comments/recommended',
|
|
7
7
|
'plugin:you-dont-need-lodash-underscore/compatible',
|
|
8
8
|
],
|
|
9
|
-
plugins: ['sonarjs', 'promise', '
|
|
9
|
+
plugins: ['sonarjs', 'promise', 'prefer-arrow', 'no-secrets', 'you-dont-need-lodash-underscore', 'unicorn'],
|
|
10
10
|
parserOptions: {
|
|
11
11
|
ecmaVersion: 9,
|
|
12
12
|
},
|
|
13
|
+
// https://eslint.org/docs/user-guide/configuring/rules#report-unused-eslint-disable-comments
|
|
14
|
+
reportUnusedDisableDirectives: true,
|
|
13
15
|
rules: {
|
|
14
16
|
// error
|
|
15
17
|
'arrow-parens': ['error', 'always'],
|
|
@@ -50,7 +52,8 @@ module.exports = {
|
|
|
50
52
|
|
|
51
53
|
'no-secrets/no-secrets': 'error',
|
|
52
54
|
|
|
53
|
-
'
|
|
55
|
+
'unicorn/better-regex': 'error',
|
|
56
|
+
'unicorn/prefer-string-slice': 'error',
|
|
54
57
|
|
|
55
58
|
// warn
|
|
56
59
|
'sonarjs/no-duplicate-string': 'warn',
|
|
@@ -62,5 +65,9 @@ module.exports = {
|
|
|
62
65
|
quotes: ['error', 'single', 'avoid-escape'],
|
|
63
66
|
'valid-jsdoc': 'off',
|
|
64
67
|
'func-names': 'off',
|
|
68
|
+
'class-methods-use-this': 'off',
|
|
69
|
+
'import/prefer-default-export': 'off',
|
|
70
|
+
camelcase: 'off',
|
|
71
|
+
'no-underscore-dangle': 'off',
|
|
65
72
|
},
|
|
66
73
|
};
|
package/config/import.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voiceflow/eslint-config",
|
|
3
3
|
"description": "ESLint config for voiceflow",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "4.0.0",
|
|
5
5
|
"author": "Eric Hacke",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/voiceflow/eslint-config/issues"
|
|
@@ -12,45 +12,43 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@typescript-eslint/eslint-plugin": "^4.
|
|
16
|
-
"@typescript-eslint/parser": "^4.
|
|
15
|
+
"@typescript-eslint/eslint-plugin": "^4.31.0",
|
|
16
|
+
"@typescript-eslint/parser": "^4.31.0",
|
|
17
17
|
"eslint-config-airbnb-base": "^14.2.1",
|
|
18
|
-
"eslint-config-prettier": "^8.
|
|
19
|
-
"eslint-import-resolver-typescript": "^2.
|
|
20
|
-
"eslint-plugin-compat": "^3.
|
|
21
|
-
"eslint-plugin-cypress": "^2.11.
|
|
18
|
+
"eslint-config-prettier": "^8.3.0",
|
|
19
|
+
"eslint-import-resolver-typescript": "^2.5.0",
|
|
20
|
+
"eslint-plugin-compat": "^3.13.0",
|
|
21
|
+
"eslint-plugin-cypress": "^2.11.3",
|
|
22
22
|
"eslint-plugin-eslint-comments": "^3.1.1",
|
|
23
|
-
"eslint-plugin-
|
|
24
|
-
"eslint-plugin-
|
|
25
|
-
"eslint-plugin-jest": "^24.3.2",
|
|
23
|
+
"eslint-plugin-import": "^2.24.2",
|
|
24
|
+
"eslint-plugin-jest": "^24.4.0",
|
|
26
25
|
"eslint-plugin-jsx-a11y": "^6.2.1",
|
|
27
|
-
"eslint-plugin-lodash": "^7.
|
|
28
|
-
"eslint-plugin-mocha": "^
|
|
26
|
+
"eslint-plugin-lodash": "^7.3.0",
|
|
27
|
+
"eslint-plugin-mocha": "^9.0.0",
|
|
29
28
|
"eslint-plugin-no-secrets": "^0.8.9",
|
|
30
|
-
"eslint-plugin-optimize-regex": "^1.2.0",
|
|
31
29
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
32
|
-
"eslint-plugin-prettier": "^
|
|
33
|
-
"eslint-plugin-promise": "^
|
|
34
|
-
"eslint-plugin-react": "^7.
|
|
30
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
31
|
+
"eslint-plugin-promise": "^5.1.0",
|
|
32
|
+
"eslint-plugin-react": "^7.25.1",
|
|
35
33
|
"eslint-plugin-react-hooks": "^4.2.0",
|
|
36
34
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
|
37
|
-
"eslint-plugin-sonarjs": "^0.
|
|
35
|
+
"eslint-plugin-sonarjs": "^0.10.0",
|
|
36
|
+
"eslint-plugin-unicorn": "^37.0.1",
|
|
38
37
|
"eslint-plugin-xss": "^0.1.9",
|
|
39
|
-
"eslint-plugin-you-dont-need-lodash-underscore": "^6.
|
|
38
|
+
"eslint-plugin-you-dont-need-lodash-underscore": "^6.12.0"
|
|
40
39
|
},
|
|
41
40
|
"devDependencies": {
|
|
42
|
-
"@voiceflow/commitlint-config": "
|
|
43
|
-
"@voiceflow/
|
|
44
|
-
"@voiceflow/
|
|
45
|
-
"@voiceflow/prettier-config": "^1.0.5",
|
|
41
|
+
"@voiceflow/commitlint-config": "1.1.0",
|
|
42
|
+
"@voiceflow/git-branch-check": "1.2.0",
|
|
43
|
+
"@voiceflow/prettier-config": "1.0.5",
|
|
46
44
|
"commitizen": "^4.2.4",
|
|
47
|
-
"commitlint": "^
|
|
45
|
+
"commitlint": "^13.1.0",
|
|
48
46
|
"cz-conventional-changelog": "^3.3.0",
|
|
49
|
-
"eslint": "^7.
|
|
47
|
+
"eslint": "^7.32.0",
|
|
50
48
|
"fixpack": "^4.0.0",
|
|
51
|
-
"husky": "^
|
|
52
|
-
"lint-staged": "^11.
|
|
53
|
-
"prettier": "^2.
|
|
49
|
+
"husky": "^7.0.2",
|
|
50
|
+
"lint-staged": "^11.1.2",
|
|
51
|
+
"prettier": "^2.4.0"
|
|
54
52
|
},
|
|
55
53
|
"files": [
|
|
56
54
|
"*.js",
|
package/typescript.js
CHANGED
|
@@ -6,12 +6,26 @@ module.exports = {
|
|
|
6
6
|
files: ['*.ts', '*.tsx'],
|
|
7
7
|
extends: ['plugin:@typescript-eslint/recommended'],
|
|
8
8
|
rules: {
|
|
9
|
+
// error
|
|
10
|
+
'@typescript-eslint/no-empty-interface': [
|
|
11
|
+
'error',
|
|
12
|
+
{
|
|
13
|
+
// Allow `interface T extends U {}`
|
|
14
|
+
allowSingleExtends: true,
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
|
|
18
|
+
|
|
9
19
|
// off
|
|
10
20
|
'no-shadow': 'off',
|
|
11
21
|
'no-unused-vars': 'off',
|
|
12
22
|
'no-use-before-define': 'off',
|
|
13
23
|
'no-useless-constructor': 'off',
|
|
14
24
|
|
|
25
|
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
26
|
+
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
27
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
28
|
+
|
|
15
29
|
'import/no-unresolved': 'off',
|
|
16
30
|
'import/export': 'off',
|
|
17
31
|
'import/named': 'off',
|