@nice-move/eslint-config-base 0.5.75 → 0.5.79

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.
Files changed (3) hide show
  1. package/lib/base.cjs +42 -33
  2. package/lib/node.cjs +21 -20
  3. package/package.json +9 -9
package/lib/base.cjs CHANGED
@@ -1,29 +1,36 @@
1
1
  'use strict';
2
2
 
3
3
  module.exports = {
4
+ env: {
5
+ browser: true,
6
+ commonjs: false,
7
+ es2017: true,
8
+ es2020: true,
9
+ es2021: true,
10
+ node: false,
11
+ },
12
+ extends: ['plugin:sonarjs/recommended'],
13
+ overrides: [
14
+ {
15
+ files: ['*.jsx', '*.tsx'],
16
+ parserOptions: {
17
+ ecmaFeatures: {
18
+ jsx: true,
19
+ },
20
+ },
21
+ },
22
+ ],
4
23
  parserOptions: {
5
- ecmaVersion: 'latest',
6
- sourceType: 'module',
7
24
  ecmaFeatures: {
8
- impliedStrict: true,
9
25
  globalReturn: false,
26
+ impliedStrict: true,
10
27
  jsx: false,
11
28
  },
12
- },
13
- env: {
14
- browser: true,
15
- es2021: true,
16
- es2020: true,
17
- es2017: true,
18
- commonjs: false,
19
- node: false,
29
+ ecmaVersion: 'latest',
30
+ sourceType: 'module',
20
31
  },
21
32
  plugins: ['eslint-comments'],
22
- extends: ['plugin:sonarjs/recommended'],
23
33
  rules: {
24
- 'sonarjs/cognitive-complexity': 0,
25
- 'sonarjs/no-duplicate-string': 0,
26
- 'sonarjs/no-identical-functions': 0,
27
34
  'array-callback-return': [
28
35
  'error',
29
36
  {
@@ -31,8 +38,6 @@ module.exports = {
31
38
  checkForEach: true,
32
39
  },
33
40
  ],
34
- 'no-useless-rename': 0,
35
- 'object-shorthand': 0,
36
41
  'arrow-body-style': 0,
37
42
  camelcase: 0,
38
43
  'class-methods-use-this': 'warn',
@@ -40,13 +45,12 @@ module.exports = {
40
45
  'eslint-comments/no-unused-disable': 'warn',
41
46
  'eslint-comments/no-unused-enable': 'warn',
42
47
  'global-require': 0,
43
- 'no-unreachable-loop': 0,
44
48
  'grouped-accessor-pairs': 0,
45
- 'no-constructor-return': 0,
46
49
  'lines-between-class-members': 0,
47
50
  'max-classes-per-file': 0,
51
+ 'no-await-in-loop': 0,
48
52
  'no-console': 0,
49
- 'prefer-exponentiation-operator': 0,
53
+ 'no-constructor-return': 0,
50
54
  'no-empty': [
51
55
  'error',
52
56
  {
@@ -62,10 +66,11 @@ module.exports = {
62
66
  'no-nested-ternary': 0,
63
67
  'no-param-reassign': [
64
68
  'warn',
65
- { props: true, ignorePropertyModificationsFor: [] },
69
+ {
70
+ ignorePropertyModificationsFor: [],
71
+ props: true,
72
+ },
66
73
  ],
67
- 'no-plusplus': 'warn',
68
- 'no-unused-expressions': ['error', { allowTaggedTemplates: true }],
69
74
  'no-restricted-syntax': [
70
75
  'error',
71
76
  {
@@ -79,9 +84,17 @@ module.exports = {
79
84
  selector: 'LabeledStatement',
80
85
  },
81
86
  ],
87
+ 'no-plusplus': 0,
82
88
  'no-template-curly-in-string': 0,
83
89
  'no-undef-init': 0,
84
90
  'no-underscore-dangle': 0,
91
+ 'no-unreachable-loop': 0,
92
+ 'no-unused-expressions': [
93
+ 'error',
94
+ {
95
+ allowTaggedTemplates: true,
96
+ },
97
+ ],
85
98
  'no-unused-vars': [
86
99
  'error',
87
100
  {
@@ -90,18 +103,14 @@ module.exports = {
90
103
  varsIgnorePattern: '^_+$',
91
104
  },
92
105
  ],
106
+ 'no-useless-rename': 0,
107
+ 'object-shorthand': 0,
93
108
  'prefer-arrow-callback': 'warn',
109
+ 'prefer-exponentiation-operator': 0,
94
110
  'prefer-template': 'warn',
111
+ 'sonarjs/cognitive-complexity': 0,
112
+ 'sonarjs/no-duplicate-string': 0,
113
+ 'sonarjs/no-identical-functions': 0,
95
114
  'spaced-comment': 0,
96
115
  },
97
- overrides: [
98
- {
99
- files: ['*.jsx', '*.tsx'],
100
- parserOptions: {
101
- ecmaFeatures: {
102
- jsx: true,
103
- },
104
- },
105
- },
106
- ],
107
116
  };
package/lib/node.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
3
  module.exports = {
4
- plugins: ['node'],
4
+ plugins: ['n'],
5
5
  rules: {
6
- 'node/shebang': 'error',
7
- 'node/no-process-env': 'error',
8
- 'node/no-path-concat': 'error',
6
+ 'n/shebang': 'error',
7
+ 'n/no-process-env': 'error',
8
+ 'n/no-path-concat': 'error',
9
9
  },
10
10
  overrides: [
11
11
  {
@@ -16,24 +16,25 @@ module.exports = {
16
16
  commonjs: true,
17
17
  },
18
18
  rules: {
19
- 'node/no-process-env': 'off',
20
- 'node/no-deprecated-api': 'error',
21
- 'node/prefer-global/url': 'warn',
22
- 'node/prefer-global/console': 'warn',
23
- 'node/prefer-global/process': 'warn',
24
- 'node/prefer-global/buffer': 'warn',
25
- 'node/prefer-global/url-search-params': 'warn',
26
- 'node/no-unsupported-features/es-builtins': 'error',
27
- 'node/no-unsupported-features/es-syntax': 'error',
28
- 'node/no-unsupported-features/node-builtins': 'error',
29
- 'node/process-exit-as-throw': 'error',
19
+ 'n/no-deprecated-api': 'error',
20
+ 'n/no-process-env': 'off',
21
+ 'n/no-process-exit': 'warn',
22
+ 'n/no-unsupported-features/es-builtins': 'error',
23
+ 'n/no-unsupported-features/es-syntax': 'error',
24
+ 'n/no-unsupported-features/node-builtins': 'error',
25
+ 'n/prefer-global/buffer': 'warn',
26
+ 'n/prefer-global/console': 'warn',
27
+ 'n/prefer-global/process': 'warn',
28
+ 'n/prefer-global/url-search-params': 'warn',
29
+ 'n/prefer-global/url': 'warn',
30
+ 'n/process-exit-as-throw': 'error',
30
31
  },
31
32
  },
32
33
  {
33
34
  files: '*.*',
34
35
  excludedFiles: ['**/*.md/*', '*.cjs', '*.md'],
35
36
  rules: {
36
- 'node/file-extension-in-import': 'error',
37
+ 'n/file-extension-in-import': 'error',
37
38
  },
38
39
  settings: {
39
40
  node: {
@@ -60,7 +61,7 @@ module.exports = {
60
61
  },
61
62
  },
62
63
  rules: {
63
- 'node/no-unsupported-features/es-syntax': [
64
+ 'n/no-unsupported-features/es-syntax': [
64
65
  'error',
65
66
  { ignores: ['modules', 'dynamicImport'] },
66
67
  ],
@@ -76,9 +77,9 @@ module.exports = {
76
77
  },
77
78
  rules: {
78
79
  strict: ['error', 'global'],
79
- 'node/no-exports-assign': 'error',
80
- 'node/no-new-require': 'error',
81
- 'node/no-unsupported-features/es-syntax': [
80
+ 'n/no-exports-assign': 'error',
81
+ 'n/no-new-require': 'error',
82
+ 'n/no-unsupported-features/es-syntax': [
82
83
  'error',
83
84
  { ignores: ['dynamicImport'] },
84
85
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice-move/eslint-config-base",
3
- "version": "0.5.75",
3
+ "version": "0.5.79",
4
4
  "description": "A `eslint` config for best practice",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -34,20 +34,20 @@
34
34
  },
35
35
  "main": "index.cjs",
36
36
  "dependencies": {
37
- "@typescript-eslint/eslint-plugin": "^5.6.0",
38
- "@typescript-eslint/parser": "^5.6.0",
37
+ "@typescript-eslint/eslint-plugin": "^5.8.1",
38
+ "@typescript-eslint/parser": "^5.8.1",
39
39
  "eslint-config-airbnb-base": "^15.0.0",
40
40
  "eslint-config-prettier": "^8.3.0",
41
41
  "eslint-plugin-eslint-comments": "^3.2.0",
42
42
  "eslint-plugin-html": "^6.2.0",
43
- "eslint-plugin-import": "^2.25.3",
43
+ "eslint-plugin-import": "^2.25.4",
44
44
  "eslint-plugin-markdown": "^2.2.1",
45
- "eslint-plugin-node": "^11.1.0",
46
- "eslint-plugin-promise": "^5.2.0",
45
+ "eslint-plugin-n": "^14.0.0",
46
+ "eslint-plugin-promise": "^6.0.0",
47
47
  "eslint-plugin-sonarjs": "^0.11.0",
48
- "eslint-plugin-unicorn": "^39.0.0",
49
- "espree": "9.2.0",
50
- "settingz": "^0.1.2"
48
+ "eslint-plugin-unicorn": "^40.0.0",
49
+ "espree": "^9.3.0",
50
+ "settingz": "^0.1.3"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "eslint": "^7.32.0"