@voiceflow/eslint-config 7.17.0 → 7.17.1-3b37425.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voiceflow/eslint-config",
3
- "version": "7.17.0",
3
+ "version": "7.17.1-3b37425.2+3b37425",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./src/index.js",
@@ -19,8 +19,9 @@
19
19
  "test:dependencies": "yarn g:depcruise --ignore-known"
20
20
  },
21
21
  "dependencies": {
22
- "@typescript-eslint/eslint-plugin": "8.47.0",
23
- "@typescript-eslint/parser": "8.47.0",
22
+ "@stylistic/eslint-plugin": "5.6.1",
23
+ "@typescript-eslint/eslint-plugin": "8.49.0",
24
+ "@typescript-eslint/parser": "8.49.0",
24
25
  "eslint-config-airbnb-base": "15.0.0",
25
26
  "eslint-config-prettier": "10.1.8",
26
27
  "eslint-formatter-junit": "9.0.1",
@@ -28,8 +29,9 @@
28
29
  "eslint-import-resolver-typescript": "4.4.4",
29
30
  "eslint-plugin-eslint-comments": "3.2.0",
30
31
  "eslint-plugin-import": "2.32.0",
31
- "eslint-plugin-jsdoc": "61.3.0",
32
+ "eslint-plugin-jsdoc": "61.5.0",
32
33
  "eslint-plugin-mdx": "3.6.2",
34
+ "eslint-plugin-n": "17.23.1",
33
35
  "eslint-plugin-no-secrets": "2.2.1",
34
36
  "eslint-plugin-prettier": "5.5.4",
35
37
  "eslint-plugin-promise": "7.2.1",
@@ -41,7 +43,7 @@
41
43
  },
42
44
  "devDependencies": {
43
45
  "@voiceflow/dependency-cruiser-config": "1.9.0",
44
- "@voiceflow/eslint-plugin": "1.7.0"
46
+ "@voiceflow/eslint-plugin": "1.7.1-3b37425.2+3b37425"
45
47
  },
46
48
  "peerDependencies": {
47
49
  "@voiceflow/eslint-plugin": "^1"
@@ -52,5 +54,5 @@
52
54
  "volta": {
53
55
  "extends": "../../package.json"
54
56
  },
55
- "gitHead": "f5a0d348e42864b285e87e723a51fb3f54e1e9c4"
57
+ "gitHead": "3b374257e6632aa66f4ec50e161ad49b26a44380"
56
58
  }
package/src/index.js CHANGED
@@ -1,9 +1,36 @@
1
- import base from './base.js';
1
+ import airbnb from './presets/airbnb.js';
2
+ import common from './presets/common.js';
3
+ import import_ from './presets/import.js';
2
4
  import mdx from './presets/mdx.js';
3
5
  import nest from './presets/nest.js';
6
+ import stylistic from './presets/stylistic.js';
4
7
  import typescript from './presets/typescript.js';
5
8
  import utility from './presets/utility.js';
6
9
  import voiceflow from './presets/voiceflow.js';
7
10
 
8
11
  /** @type {import('eslint').Linter.Config[]} */
9
- export default [...base, ...typescript, ...mdx, ...nest, ...utility, ...voiceflow];
12
+ export default [
13
+ {
14
+ ignores: [
15
+ '**/build/**',
16
+ '**/dist/**',
17
+ '**/node_modules/**',
18
+ '**/sonar/**',
19
+ '**/generated/**',
20
+ '**/.yarn/**',
21
+ '**/.yalc/**',
22
+ '**/.turbo/**',
23
+ '**/.vercel/**',
24
+ '**/*.json',
25
+ ],
26
+ },
27
+ ...airbnb,
28
+ ...common,
29
+ ...import_,
30
+ ...stylistic,
31
+ ...typescript,
32
+ ...mdx,
33
+ ...nest,
34
+ ...utility,
35
+ ...voiceflow,
36
+ ];
@@ -1,5 +1,6 @@
1
1
  import comments from 'eslint-plugin-eslint-comments';
2
2
  import jsdoc from 'eslint-plugin-jsdoc';
3
+ import node from 'eslint-plugin-n';
3
4
  import noSecrets from 'eslint-plugin-no-secrets';
4
5
  import prettier from 'eslint-plugin-prettier/recommended';
5
6
  import promise from 'eslint-plugin-promise';
@@ -15,6 +16,7 @@ export default [
15
16
  sonarjs,
16
17
  promise,
17
18
  unicorn,
19
+ node,
18
20
  'eslint-comments': comments,
19
21
  'you-dont-need-lodash-underscore': youDontNeed,
20
22
  'no-secrets': noSecrets,
@@ -38,10 +40,7 @@ export default [
38
40
 
39
41
  rules: {
40
42
  // error
41
- 'arrow-parens': ['error', 'always'],
42
- 'callback-return': 'error',
43
43
  'capitalized-comments': 'error',
44
- 'handle-callback-err': 'error',
45
44
  'max-depth': ['error', 3],
46
45
  'max-len': [
47
46
  'error',
@@ -56,11 +55,10 @@ export default [
56
55
  'max-nested-callbacks': ['error', 5],
57
56
  'max-params': ['error', 5],
58
57
  'no-console': 'error',
59
- 'no-process-exit': 'error',
58
+ 'no-object-constructor': 'error',
59
+ 'no-new-native-nonconstructor': 'error',
60
60
  'no-useless-call': 'error',
61
- 'quote-props': ['error', 'as-needed'],
62
61
  'prefer-arrow-callback': ['error', { allowNamedFunctions: true, allowUnboundThis: true }],
63
- 'lines-between-class-members': 'error',
64
62
  'no-restricted-imports': [
65
63
  'error',
66
64
  {
@@ -78,6 +76,14 @@ export default [
78
76
 
79
77
  'no-secrets/no-secrets': 'error',
80
78
 
79
+ 'node/callback-return': 'error',
80
+ 'node/global-require': 'error',
81
+ 'node/handle-callback-err': 'error',
82
+ 'node/no-deprecated-api': 'error',
83
+ 'node/no-new-require': 'error',
84
+ 'node/no-path-concat': 'error',
85
+ 'node/no-process-exit': 'error',
86
+
81
87
  'unicorn/better-regex': 'error',
82
88
  'unicorn/prefer-set-has': 'error',
83
89
 
@@ -92,13 +98,21 @@ export default [
92
98
  'no-plusplus': 'off',
93
99
  'no-continue': 'off',
94
100
  'require-jsdoc': 'off', // not sure we want this
95
- quotes: ['error', 'single', 'avoid-escape'],
96
101
  'valid-jsdoc': 'off',
97
102
  'func-names': 'off',
103
+ 'global-require': 'off',
98
104
  'class-methods-use-this': 'off',
99
105
  camelcase: 'off',
106
+ 'lines-around-directive': 'off',
107
+ 'lines-between-class-members': 'off',
108
+ 'no-buffer-constructor': 'off',
109
+ 'no-new-object': 'off',
110
+ 'no-new-require': 'off',
111
+ 'no-new-symbol': 'off',
112
+ 'no-path-concat': 'off',
100
113
  'no-underscore-dangle': 'off',
101
114
  'no-restricted-syntax': 'off',
115
+ 'no-return-await': 'off',
102
116
  'sonarjs/new-cap': 'off',
103
117
  'sonarjs/no-unreachable': 'off',
104
118
  'sonarjs/no-commented-code': 'off',
@@ -1,4 +1,4 @@
1
- /** @type {import('eslint').Linter.Config} */
1
+ /** @type {import('eslint').Linter.Config[]} */
2
2
  export default [
3
3
  {
4
4
  files: ['**/*.controller.ts', '**/*.decorator.ts', '**/*.factory.ts', '**/*.module.ts', '**/*.service.ts'],
@@ -0,0 +1,23 @@
1
+ import stylistic from '@stylistic/eslint-plugin';
2
+
3
+ /** @type {import('eslint').Linter.Config[]} */
4
+ export default [
5
+ stylistic.configs['disable-legacy'],
6
+ {
7
+ plugins: {
8
+ '@stylistic': stylistic,
9
+ },
10
+ rules: {
11
+ '@stylistic/arrow-parens': 'error',
12
+ '@stylistic/padding-line-between-statements': [
13
+ 'error',
14
+ { blankLine: 'always', prev: 'directive', next: '*' },
15
+ { blankLine: 'any', prev: 'directive', next: 'directive' },
16
+ ],
17
+ '@stylistic/lines-between-class-members': 'error',
18
+ '@stylistic/quote-props': ['error', 'as-needed'],
19
+ '@stylistic/quotes': ['error', 'single', { avoidEscape: true }],
20
+ '@stylistic/spaced-comment': 'error',
21
+ },
22
+ },
23
+ ];
@@ -18,13 +18,6 @@ export default [
18
18
  ...typescript.configs.recommended.rules,
19
19
 
20
20
  // error
21
- '@typescript-eslint/no-empty-interface': [
22
- 'error',
23
- {
24
- // Allow `interface T extends U {}`
25
- allowSingleExtends: true,
26
- },
27
- ],
28
21
  '@typescript-eslint/no-empty-object-type': [
29
22
  'error',
30
23
  {
package/src/base.js DELETED
@@ -1,26 +0,0 @@
1
- import airbnb from './presets/airbnb.js';
2
- import common from './presets/common.js';
3
- import import_ from './presets/import.js';
4
- import voiceflow from './presets/voiceflow.js';
5
-
6
- /** @type {import('eslint').Linter.Config[]} */
7
- export default [
8
- {
9
- ignores: [
10
- '**/build/**',
11
- '**/dist/**',
12
- '**/node_modules/**',
13
- '**/sonar/**',
14
- '**/generated/**',
15
- '**/.yarn/**',
16
- '**/.yalc/**',
17
- '**/.turbo/**',
18
- '**/.vercel/**',
19
- '**/*.json',
20
- ],
21
- },
22
- ...airbnb,
23
- ...common,
24
- ...import_,
25
- ...voiceflow,
26
- ];