@ornikar/eslint-config 18.8.0 → 18.11.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/CHANGELOG.md CHANGED
@@ -3,6 +3,51 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [18.11.0](https://github.com/ornikar/eslint-configs/compare/v18.10.0...v18.11.0) (2022-06-07)
7
+
8
+
9
+ ### Features
10
+
11
+ * disable no-process-exit rule from eslint-plugin-node [no issue] ([#322](https://github.com/ornikar/eslint-configs/issues/322)) ([f51fd2c](https://github.com/ornikar/eslint-configs/commit/f51fd2c5deecdda56d8746c1e8ab951ca5e9e0dc))
12
+
13
+
14
+
15
+
16
+
17
+ # [18.10.0](https://github.com/ornikar/eslint-configs/compare/v18.9.0...v18.10.0) (2022-05-31)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **eslint-config:** allow non-linteral fs filename for tests ([31cc2f3](https://github.com/ornikar/eslint-configs/commit/31cc2f3d98a415956122a315ec742ed30120865e))
23
+
24
+
25
+ ### Features
26
+
27
+ * **eslint-config:** prefer-native-coercion-functions ([#311](https://github.com/ornikar/eslint-configs/issues/311)) ([ecb42c7](https://github.com/ornikar/eslint-configs/commit/ecb42c7146cee49d705357bfe29e68d7438c1859))
28
+
29
+
30
+
31
+
32
+
33
+ # [18.9.0](https://github.com/ornikar/eslint-configs/compare/v18.8.0...v18.9.0) (2022-05-31)
34
+
35
+
36
+ ### Bug Fixes
37
+
38
+ * **eslint-config:** allow non-linteral fs filename for dev scripts ([9a28882](https://github.com/ornikar/eslint-configs/commit/9a288820bc48fe2e428235b4b0d5c629c5d8367e))
39
+
40
+
41
+ ### Features
42
+
43
+ * **eslint-config:** enable unicorn/prefer-modern-math-apis [no issue] ([#309](https://github.com/ornikar/eslint-configs/issues/309)) ([1e2d294](https://github.com/ornikar/eslint-configs/commit/1e2d294030c4604afdf0cbcf9406302113cac64b))
44
+ * replace eslint-plugin-node by eslint-plugin-n [no issue] ([#310](https://github.com/ornikar/eslint-configs/issues/310)) ([8fd3c19](https://github.com/ornikar/eslint-configs/commit/8fd3c19df11d15cff679e0880f20e8b032c73e5c))
45
+ * update expiring todo comments [no issue] ([#297](https://github.com/ornikar/eslint-configs/issues/297)) ([0cc2e08](https://github.com/ornikar/eslint-configs/commit/0cc2e0835a1f5fb7fbe3ed76bea5d1242b02c479))
46
+
47
+
48
+
49
+
50
+
6
51
  # [18.8.0](https://github.com/ornikar/eslint-configs/compare/v18.7.0...v18.8.0) (2022-05-02)
7
52
 
8
53
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  /* prefer usage of .mjs files over this override */
4
4
  module.exports = {
5
- extends: ['plugin:node/recommended-module', require.resolve('./rules/node-override')],
5
+ extends: ['plugin:n/recommended-module', require.resolve('./rules/node-override')],
6
6
  };
package/package.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "name": "@ornikar/eslint-config",
3
- "version": "18.8.0",
3
+ "version": "18.11.0",
4
4
  "description": "eslint config files",
5
- "repository": "ornikar/eslint-configs",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/ornikar/eslint-configs.git",
8
+ "directory": "@ornikar/eslint-config"
9
+ },
6
10
  "main": "index.js",
7
11
  "license": "ISC",
8
12
  "engines": {
@@ -17,7 +21,7 @@
17
21
  "eslint-plugin-import": "^2.25.4",
18
22
  "eslint-plugin-jest": "^26.1.5",
19
23
  "eslint-plugin-jsx-a11y": "^6.4.1",
20
- "eslint-plugin-node": "^11.1.0",
24
+ "eslint-plugin-n": "^15.2.0",
21
25
  "eslint-plugin-security": "^1.5.0",
22
26
  "eslint-plugin-simple-import-sort": "^7.0.0",
23
27
  "eslint-plugin-unicorn": "^42.0.0"
@@ -27,8 +31,8 @@
27
31
  "prettier": "^2.2.1"
28
32
  },
29
33
  "devDependencies": {
30
- "eslint": "8.14.0",
34
+ "eslint": "8.16.0",
31
35
  "prettier": "2.6.2"
32
36
  },
33
- "gitHead": "004aa9c1bb2cc7c6b8e17d734c4f856d6676d5e4"
37
+ "gitHead": "94f2317e02a558fb56955486b739314c32e9b7fd"
34
38
  }
package/root.js CHANGED
@@ -11,5 +11,9 @@ module.exports = {
11
11
  devDependencies: true,
12
12
  },
13
13
  ],
14
+
15
+ // Allow non-literal fs filename for dev scripts
16
+ 'security/detect-non-literal-fs-filename': 'off',
17
+ 'security/detect-non-literal-require': 'off',
14
18
  },
15
19
  };
@@ -5,18 +5,19 @@ const airbnbStyleRules = require('eslint-config-airbnb-base/rules/style');
5
5
  module.exports = {
6
6
  rules: {
7
7
  // already checked by import plugin
8
- 'node/no-unpublished-require': 'off',
9
- 'node/no-unpublished-import': 'off',
10
- 'node/no-extraneous-require': 'off',
11
- 'node/no-extraneous-import': 'off',
12
- 'node/no-missing-require': 'off',
13
- 'node/no-missing-import': 'off',
8
+ 'n/no-unpublished-require': 'off',
9
+ 'n/no-unpublished-import': 'off',
10
+ 'n/no-extraneous-require': 'off',
11
+ 'n/no-extraneous-import': 'off',
12
+ 'n/no-missing-require': 'off',
13
+ 'n/no-missing-import': 'off',
14
14
 
15
15
  // Use for-of instead of for
16
16
  'unicorn/no-for-loop': 'error',
17
17
 
18
- // allow process.exit
18
+ // allow process.exit, disallowed when not used in script via https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-process-exit.md
19
19
  'no-process-exit': 'off',
20
+ 'n/no-process-exit': 'off',
20
21
 
21
22
  // Allow for-of, now supported by node 6
22
23
  'no-restricted-syntax': [
package/rules/node.js CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  module.exports = {
4
- plugins: ['node'],
5
- extends: ['plugin:node/recommended', require.resolve('./node-override')],
4
+ plugins: ['n'],
5
+ extends: ['plugin:n/recommended', require.resolve('./node-override')],
6
6
 
7
7
  parserOptions: {
8
8
  // top level await is introduced in ecmaVersion: 2022 but supported since node 14
@@ -18,11 +18,11 @@ module.exports = {
18
18
  overrides: [
19
19
  {
20
20
  files: ['*.cjs'],
21
- extends: ['plugin:node/recommended-script', require.resolve('./node-override')],
21
+ extends: ['plugin:n/recommended-script', require.resolve('./node-override')],
22
22
  },
23
23
  {
24
24
  files: ['*.mjs'],
25
- extends: ['plugin:node/recommended-module', require.resolve('./node-override')],
25
+ extends: ['plugin:n/recommended-module', require.resolve('./node-override')],
26
26
  parserOptions: {
27
27
  // top level await is introduced in ecmaVersion: 2022 but supported since node 14
28
28
  ecmaVersion: 2022,
package/rules/unicorn.js CHANGED
@@ -112,9 +112,12 @@ const formTree = shallow(tree.find(x => FormWithApiCall(x)).prop('children')());
112
112
 
113
113
  // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/expiring-todo-comments.md
114
114
  'unicorn/expiring-todo-comments': [
115
- 'error',
115
+ 'warn',
116
116
  {
117
117
  allowWarningComments: false,
118
+ ignoreDatesOnPullRequests: true,
119
+ ignore: [/(\[https:\/\/ornikar.atlassian.net\/browse\/[A-Z]+-\d+])/i], // JIRA issue format (ex: https://ornikar.atlassian.net/browse/DR-123)
120
+ date: '9999-12-31', // invalidates all expiring dates <9999-12-31
118
121
  },
119
122
  ],
120
123
 
@@ -281,12 +284,12 @@ const formTree = shallow(tree.find(x => FormWithApiCall(x)).prop('children')());
281
284
  'unicorn/no-useless-switch-case': 'off',
282
285
 
283
286
  // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-modern-math-apis.md
284
- 'unicorn/prefer-modern-math-apis': 'off',
287
+ 'unicorn/prefer-modern-math-apis': 'error',
285
288
 
286
289
  // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unreadable-iife.md
287
290
  'unicorn/no-unreadable-iife': 'off',
288
291
 
289
292
  // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-native-coercion-functions.md
290
- 'unicorn/prefer-native-coercion-functions': 'off',
293
+ 'unicorn/prefer-native-coercion-functions': 'error',
291
294
  },
292
295
  };
package/tests-override.js CHANGED
@@ -15,5 +15,9 @@ module.exports = {
15
15
  devDependencies: true,
16
16
  },
17
17
  ],
18
+
19
+ // Allow non-literal fs filename for tests
20
+ 'security/detect-non-literal-fs-filename': 'off',
21
+ 'security/detect-non-literal-require': 'off',
18
22
  },
19
23
  };