@w0s/eslint-config 9.3.0 → 9.3.1
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/README.md +50 -50
- package/eslint.config.js +122 -122
- package/package.json +51 -46
- package/rules/eslint/possible-problems.js +48 -48
- package/rules/eslint/suggestions.js +148 -148
- package/rules/functional.js +55 -55
package/README.md
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
# eslint-config
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.com/package/@w0s/eslint-config)
|
|
4
|
-
[](https://github.com/SaekiTominaga/w0s/actions/workflows/eslint.yml)
|
|
5
|
-
|
|
6
|
-
ESLint configuration file used on my personal website ([`w0s.jp`](https://github.com/SaekiTominaga/w0s.jp)).
|
|
7
|
-
|
|
8
|
-
## Base rules & plugins
|
|
9
|
-
|
|
10
|
-
### All files (Vanilla JavaScript, etc.)
|
|
11
|
-
|
|
12
|
-
- [eslint](https://eslint.org/): recommended
|
|
13
|
-
- [eslint-plugin-functional](https://github.com/eslint-functional/eslint-plugin-functional): externalVanillaRecommended, recommended, stylistic
|
|
14
|
-
- [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import): recommended
|
|
15
|
-
- [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc): recommended
|
|
16
|
-
- [eslint-plugin-safely-storage](https://github.com/SaekiTominaga/eslint-plugin/tree/main/packages/safely-storage)
|
|
17
|
-
- and, some customizations
|
|
18
|
-
|
|
19
|
-
### TypeScript
|
|
20
|
-
|
|
21
|
-
- [@typescript-eslint/eslint-plugin](https://typescript-eslint.io/): strict-type-checked, stylistic-type-checked
|
|
22
|
-
- [eslint-plugin-functional](https://github.com/eslint-functional/eslint-plugin-functional): externalTypeScriptRecommended, recommended, stylistic
|
|
23
|
-
- [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc/): recommended-typescript
|
|
24
|
-
- and, some customizations
|
|
25
|
-
|
|
26
|
-
## Usage
|
|
27
|
-
|
|
28
|
-
```javascript
|
|
29
|
-
import w0sConfig from '@w0s/eslint-config';
|
|
30
|
-
|
|
31
|
-
/** @type {import("eslint").Linter.Config[]} */
|
|
32
|
-
export default [
|
|
33
|
-
...w0sConfig,
|
|
34
|
-
{
|
|
35
|
-
// other options
|
|
36
|
-
},
|
|
37
|
-
];
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
or
|
|
41
|
-
|
|
42
|
-
```javascript
|
|
43
|
-
import { defineConfig } from 'eslint/config';
|
|
44
|
-
import w0sConfig from '@w0s/eslint-config';
|
|
45
|
-
|
|
46
|
-
/** @type {import("eslint").Linter.Config[]} */
|
|
47
|
-
export default defineConfig(w0sConfig, {
|
|
48
|
-
// other options
|
|
49
|
-
});
|
|
50
|
-
```
|
|
1
|
+
# eslint-config
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@w0s/eslint-config)
|
|
4
|
+
[](https://github.com/SaekiTominaga/w0s/actions/workflows/eslint.yml)
|
|
5
|
+
|
|
6
|
+
ESLint configuration file used on my personal website ([`w0s.jp`](https://github.com/SaekiTominaga/w0s.jp)).
|
|
7
|
+
|
|
8
|
+
## Base rules & plugins
|
|
9
|
+
|
|
10
|
+
### All files (Vanilla JavaScript, etc.)
|
|
11
|
+
|
|
12
|
+
- [eslint](https://eslint.org/): recommended
|
|
13
|
+
- [eslint-plugin-functional](https://github.com/eslint-functional/eslint-plugin-functional): externalVanillaRecommended, recommended, stylistic
|
|
14
|
+
- [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import): recommended
|
|
15
|
+
- [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc): recommended
|
|
16
|
+
- [eslint-plugin-safely-storage](https://github.com/SaekiTominaga/eslint-plugin/tree/main/packages/safely-storage)
|
|
17
|
+
- and, some customizations
|
|
18
|
+
|
|
19
|
+
### TypeScript
|
|
20
|
+
|
|
21
|
+
- [@typescript-eslint/eslint-plugin](https://typescript-eslint.io/): strict-type-checked, stylistic-type-checked
|
|
22
|
+
- [eslint-plugin-functional](https://github.com/eslint-functional/eslint-plugin-functional): externalTypeScriptRecommended, recommended, stylistic
|
|
23
|
+
- [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc/): recommended-typescript
|
|
24
|
+
- and, some customizations
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
```javascript
|
|
29
|
+
import w0sConfig from '@w0s/eslint-config';
|
|
30
|
+
|
|
31
|
+
/** @type {import("eslint").Linter.Config[]} */
|
|
32
|
+
export default [
|
|
33
|
+
...w0sConfig,
|
|
34
|
+
{
|
|
35
|
+
// other options
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
or
|
|
41
|
+
|
|
42
|
+
```javascript
|
|
43
|
+
import { defineConfig } from 'eslint/config';
|
|
44
|
+
import w0sConfig from '@w0s/eslint-config';
|
|
45
|
+
|
|
46
|
+
/** @type {import("eslint").Linter.Config[]} */
|
|
47
|
+
export default defineConfig(w0sConfig, {
|
|
48
|
+
// other options
|
|
49
|
+
});
|
|
50
|
+
```
|
package/eslint.config.js
CHANGED
|
@@ -1,122 +1,122 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
/* eslint-disable import/no-unresolved */
|
|
3
|
-
|
|
4
|
-
import { defineConfig } from 'eslint/config';
|
|
5
|
-
import pluginFunctional from 'eslint-plugin-functional';
|
|
6
|
-
import pluginImport from 'eslint-plugin-import';
|
|
7
|
-
import { jsdoc as pluginJsdoc } from 'eslint-plugin-jsdoc';
|
|
8
|
-
import pluginSafelyStorage from 'eslint-plugin-safely-storage';
|
|
9
|
-
import globals from 'globals';
|
|
10
|
-
import tseslint from 'typescript-eslint';
|
|
11
|
-
import eslint from '@eslint/js';
|
|
12
|
-
import configEslintLayoutFormatting from './rules/eslint/layout&formatting.js';
|
|
13
|
-
import configEslintPossibleProblems from './rules/eslint/possible-problems.js';
|
|
14
|
-
import configEslintSuggestions from './rules/eslint/suggestions.js';
|
|
15
|
-
import configFunctional from './rules/functional.js';
|
|
16
|
-
import configImport from './rules/import.js';
|
|
17
|
-
import configJsdoc from './rules/jsdoc.js';
|
|
18
|
-
|
|
19
|
-
/** @type {import("eslint").Linter.Config[]} */
|
|
20
|
-
export default defineConfig(
|
|
21
|
-
eslint.configs.recommended,
|
|
22
|
-
configEslintPossibleProblems,
|
|
23
|
-
configEslintSuggestions,
|
|
24
|
-
configEslintLayoutFormatting,
|
|
25
|
-
|
|
26
|
-
/* Plugins */
|
|
27
|
-
pluginImport.flatConfigs.recommended,
|
|
28
|
-
configImport,
|
|
29
|
-
|
|
30
|
-
pluginJsdoc({ config: 'flat/recommended' }),
|
|
31
|
-
configJsdoc,
|
|
32
|
-
|
|
33
|
-
pluginSafelyStorage.configs.default,
|
|
34
|
-
|
|
35
|
-
{
|
|
36
|
-
files: ['**/*.js'],
|
|
37
|
-
languageOptions: {
|
|
38
|
-
ecmaVersion: 'latest', // デフォルト値は 'latest' だが明示的な指定が必要
|
|
39
|
-
globals: globals.nodeBuiltin,
|
|
40
|
-
},
|
|
41
|
-
extends: [
|
|
42
|
-
pluginFunctional.configs.externalVanillaRecommended,
|
|
43
|
-
pluginFunctional.configs.recommended,
|
|
44
|
-
pluginFunctional.configs.stylistic,
|
|
45
|
-
pluginFunctional.configs.disableTypeChecked,
|
|
46
|
-
],
|
|
47
|
-
rules: {
|
|
48
|
-
...configFunctional.rules,
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
files: ['**/*.ts'],
|
|
53
|
-
languageOptions: {
|
|
54
|
-
parserOptions: {
|
|
55
|
-
project: true,
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
extends: [
|
|
59
|
-
tseslint.configs.strictTypeChecked,
|
|
60
|
-
tseslint.configs.stylisticTypeChecked,
|
|
61
|
-
pluginFunctional.configs.externalTypeScriptRecommended,
|
|
62
|
-
pluginFunctional.configs.recommended,
|
|
63
|
-
pluginFunctional.configs.stylistic,
|
|
64
|
-
pluginJsdoc({ config: 'flat/recommended-typescript' }),
|
|
65
|
-
],
|
|
66
|
-
rules: {
|
|
67
|
-
'dot-notation': 'off',
|
|
68
|
-
'no-unused-vars': 'off',
|
|
69
|
-
...configFunctional.rules,
|
|
70
|
-
'import/extensions': [
|
|
71
|
-
'error',
|
|
72
|
-
'ignorePackages',
|
|
73
|
-
{
|
|
74
|
-
js: 'never',
|
|
75
|
-
},
|
|
76
|
-
],
|
|
77
|
-
'import/no-unresolved': 'off',
|
|
78
|
-
'@typescript-eslint/no-unused-vars': [
|
|
79
|
-
'error',
|
|
80
|
-
{
|
|
81
|
-
caughtErrors: 'none',
|
|
82
|
-
},
|
|
83
|
-
],
|
|
84
|
-
'@typescript-eslint/strict-boolean-expressions': [
|
|
85
|
-
'error',
|
|
86
|
-
{
|
|
87
|
-
allowNullableBoolean: true,
|
|
88
|
-
allowNullableObject: false,
|
|
89
|
-
allowNumber: false,
|
|
90
|
-
allowString: false,
|
|
91
|
-
},
|
|
92
|
-
],
|
|
93
|
-
'@typescript-eslint/switch-exhaustiveness-check': [
|
|
94
|
-
'error',
|
|
95
|
-
{
|
|
96
|
-
considerDefaultExhaustiveForUnions: true,
|
|
97
|
-
},
|
|
98
|
-
], // eslint-plugin-functional; externalTypeScriptRecommended
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
files: ['**/*.config.js'],
|
|
103
|
-
rules: {
|
|
104
|
-
'import/no-extraneous-dependencies': 'off',
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
files: ['**/*.test.js', '**/*.test.ts'],
|
|
109
|
-
rules: {
|
|
110
|
-
'no-new': 'off',
|
|
111
|
-
'no-unused-expressions': 'off',
|
|
112
|
-
'import/no-extraneous-dependencies': 'off',
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
files: ['**/*.test.ts'],
|
|
117
|
-
rules: {
|
|
118
|
-
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
119
|
-
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
);
|
|
1
|
+
// @ts-check
|
|
2
|
+
/* eslint-disable import/no-unresolved */
|
|
3
|
+
|
|
4
|
+
import { defineConfig } from 'eslint/config';
|
|
5
|
+
import pluginFunctional from 'eslint-plugin-functional';
|
|
6
|
+
import pluginImport from 'eslint-plugin-import';
|
|
7
|
+
import { jsdoc as pluginJsdoc } from 'eslint-plugin-jsdoc';
|
|
8
|
+
import pluginSafelyStorage from 'eslint-plugin-safely-storage';
|
|
9
|
+
import globals from 'globals';
|
|
10
|
+
import tseslint from 'typescript-eslint';
|
|
11
|
+
import eslint from '@eslint/js';
|
|
12
|
+
import configEslintLayoutFormatting from './rules/eslint/layout&formatting.js';
|
|
13
|
+
import configEslintPossibleProblems from './rules/eslint/possible-problems.js';
|
|
14
|
+
import configEslintSuggestions from './rules/eslint/suggestions.js';
|
|
15
|
+
import configFunctional from './rules/functional.js';
|
|
16
|
+
import configImport from './rules/import.js';
|
|
17
|
+
import configJsdoc from './rules/jsdoc.js';
|
|
18
|
+
|
|
19
|
+
/** @type {import("eslint").Linter.Config[]} */
|
|
20
|
+
export default defineConfig(
|
|
21
|
+
eslint.configs.recommended,
|
|
22
|
+
configEslintPossibleProblems,
|
|
23
|
+
configEslintSuggestions,
|
|
24
|
+
configEslintLayoutFormatting,
|
|
25
|
+
|
|
26
|
+
/* Plugins */
|
|
27
|
+
pluginImport.flatConfigs.recommended,
|
|
28
|
+
configImport,
|
|
29
|
+
|
|
30
|
+
pluginJsdoc({ config: 'flat/recommended' }),
|
|
31
|
+
configJsdoc,
|
|
32
|
+
|
|
33
|
+
pluginSafelyStorage.configs.default,
|
|
34
|
+
|
|
35
|
+
{
|
|
36
|
+
files: ['**/*.js'],
|
|
37
|
+
languageOptions: {
|
|
38
|
+
ecmaVersion: 'latest', // デフォルト値は 'latest' だが明示的な指定が必要
|
|
39
|
+
globals: globals.nodeBuiltin,
|
|
40
|
+
},
|
|
41
|
+
extends: [
|
|
42
|
+
pluginFunctional.configs.externalVanillaRecommended,
|
|
43
|
+
pluginFunctional.configs.recommended,
|
|
44
|
+
pluginFunctional.configs.stylistic,
|
|
45
|
+
pluginFunctional.configs.disableTypeChecked,
|
|
46
|
+
],
|
|
47
|
+
rules: {
|
|
48
|
+
...configFunctional.rules,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
files: ['**/*.ts'],
|
|
53
|
+
languageOptions: {
|
|
54
|
+
parserOptions: {
|
|
55
|
+
project: true,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
extends: [
|
|
59
|
+
tseslint.configs.strictTypeChecked,
|
|
60
|
+
tseslint.configs.stylisticTypeChecked,
|
|
61
|
+
pluginFunctional.configs.externalTypeScriptRecommended,
|
|
62
|
+
pluginFunctional.configs.recommended,
|
|
63
|
+
pluginFunctional.configs.stylistic,
|
|
64
|
+
pluginJsdoc({ config: 'flat/recommended-typescript' }),
|
|
65
|
+
],
|
|
66
|
+
rules: {
|
|
67
|
+
'dot-notation': 'off',
|
|
68
|
+
'no-unused-vars': 'off',
|
|
69
|
+
...configFunctional.rules,
|
|
70
|
+
'import/extensions': [
|
|
71
|
+
'error',
|
|
72
|
+
'ignorePackages',
|
|
73
|
+
{
|
|
74
|
+
js: 'never',
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
'import/no-unresolved': 'off',
|
|
78
|
+
'@typescript-eslint/no-unused-vars': [
|
|
79
|
+
'error',
|
|
80
|
+
{
|
|
81
|
+
caughtErrors: 'none',
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
'@typescript-eslint/strict-boolean-expressions': [
|
|
85
|
+
'error',
|
|
86
|
+
{
|
|
87
|
+
allowNullableBoolean: true,
|
|
88
|
+
allowNullableObject: false,
|
|
89
|
+
allowNumber: false,
|
|
90
|
+
allowString: false,
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
'@typescript-eslint/switch-exhaustiveness-check': [
|
|
94
|
+
'error',
|
|
95
|
+
{
|
|
96
|
+
considerDefaultExhaustiveForUnions: true,
|
|
97
|
+
},
|
|
98
|
+
], // eslint-plugin-functional; externalTypeScriptRecommended
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
files: ['**/*.config.js'],
|
|
103
|
+
rules: {
|
|
104
|
+
'import/no-extraneous-dependencies': 'off',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
files: ['**/*.test.js', '**/*.test.ts'],
|
|
109
|
+
rules: {
|
|
110
|
+
'no-new': 'off',
|
|
111
|
+
'no-unused-expressions': 'off',
|
|
112
|
+
'import/no-extraneous-dependencies': 'off',
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
files: ['**/*.test.ts'],
|
|
117
|
+
rules: {
|
|
118
|
+
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
119
|
+
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
);
|
package/package.json
CHANGED
|
@@ -1,46 +1,51 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@w0s/eslint-config",
|
|
3
|
-
"version": "9.3.
|
|
4
|
-
"description": "ESLint configuration file used on `w0s.jp`",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"eslint",
|
|
7
|
-
"eslintconfig",
|
|
8
|
-
"eslint-config",
|
|
9
|
-
"styleguide"
|
|
10
|
-
],
|
|
11
|
-
"license": "MIT",
|
|
12
|
-
"author": "Saeki Tominaga",
|
|
13
|
-
"files": [
|
|
14
|
-
"rules"
|
|
15
|
-
],
|
|
16
|
-
"type": "module",
|
|
17
|
-
"main": "eslint.config.js",
|
|
18
|
-
"repository": {
|
|
19
|
-
"type": "git",
|
|
20
|
-
"url": "git+https://github.com/SaekiTominaga/config.git"
|
|
21
|
-
},
|
|
22
|
-
"scripts": {
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"lint": "eslint __tests__/valid/**/*.{js,ts} __tests__/*.test.js rules/**/*.js eslint.config.js"
|
|
26
|
-
},
|
|
27
|
-
"
|
|
28
|
-
"@eslint/js": "^9.39.
|
|
29
|
-
"
|
|
30
|
-
"eslint
|
|
31
|
-
"eslint-plugin-
|
|
32
|
-
"eslint-plugin-
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"eslint": "^9.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@w0s/eslint-config",
|
|
3
|
+
"version": "9.3.1",
|
|
4
|
+
"description": "ESLint configuration file used on `w0s.jp`",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"eslint",
|
|
7
|
+
"eslintconfig",
|
|
8
|
+
"eslint-config",
|
|
9
|
+
"styleguide"
|
|
10
|
+
],
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"author": "Saeki Tominaga",
|
|
13
|
+
"files": [
|
|
14
|
+
"rules"
|
|
15
|
+
],
|
|
16
|
+
"type": "module",
|
|
17
|
+
"main": "eslint.config.js",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/SaekiTominaga/config.git"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"pretest": "tsc",
|
|
24
|
+
"test": "node __tests__/index.test.js",
|
|
25
|
+
"lint": "eslint __tests__/valid/**/*.{js,ts} __tests__/*.test.js rules/**/*.js eslint.config.js"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@eslint/js": "^9.39.2",
|
|
29
|
+
"@types/node": "^24.10.3",
|
|
30
|
+
"eslint": "^9.39.2",
|
|
31
|
+
"eslint-plugin-functional": "^9.0.2",
|
|
32
|
+
"eslint-plugin-import": "^2.32.0",
|
|
33
|
+
"eslint-plugin-jsdoc": "^61.5.0",
|
|
34
|
+
"eslint-plugin-safely-storage": "^1.0.3",
|
|
35
|
+
"globals": "^16.4.0",
|
|
36
|
+
"typescript-eslint": "^8.49.0"
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"@eslint/js": "^9.35.0",
|
|
40
|
+
"eslint": "^9.35.0",
|
|
41
|
+
"eslint-plugin-functional": "^9.0.0",
|
|
42
|
+
"eslint-plugin-import": "^2.32.0",
|
|
43
|
+
"eslint-plugin-jsdoc": "^61.2.0",
|
|
44
|
+
"eslint-plugin-safely-storage": "^1.0.0",
|
|
45
|
+
"globals": "^16.4.0",
|
|
46
|
+
"typescript-eslint": "^8.46.0"
|
|
47
|
+
},
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
/** @type {import("eslint").Linter.Config} */
|
|
2
|
-
export default {
|
|
3
|
-
rules: {
|
|
4
|
-
'array-callback-return': [
|
|
5
|
-
'error',
|
|
6
|
-
{
|
|
7
|
-
allowImplicit: true,
|
|
8
|
-
},
|
|
9
|
-
], // eslint-config-airbnb-base@15.0.0; best-practices
|
|
10
|
-
'no-await-in-loop': 'error', // eslint-config-airbnb-base@15.0.0; errors
|
|
11
|
-
'no-cond-assign': ['error', 'always'], // eslint-config-airbnb-base@15.0.0; errors
|
|
12
|
-
'no-console': 'warn', // eslint-config-airbnb-base@15.0.0; errors
|
|
13
|
-
'no-continue': 'error', // eslint-config-airbnb-base@15.0.0; style
|
|
14
|
-
'no-constructor-return': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
15
|
-
'no-irregular-whitespace': [
|
|
16
|
-
'error',
|
|
17
|
-
{
|
|
18
|
-
skipComments: true,
|
|
19
|
-
skipRegExps: true,
|
|
20
|
-
skipTemplates: true,
|
|
21
|
-
},
|
|
22
|
-
],
|
|
23
|
-
'no-promise-executor-return': 'error', // eslint-config-airbnb-base@15.0.0; errors
|
|
24
|
-
'no-self-compare': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
25
|
-
'no-template-curly-in-string': 'error', // eslint-config-airbnb-base@15.0.0; errors
|
|
26
|
-
'no-unassigned-vars': 'error', // ESLint 10 recommended candidate https://github.com/eslint/eslint/issues/19966
|
|
27
|
-
'no-unmodified-loop-condition': 'error',
|
|
28
|
-
'no-unsafe-optional-chaining': [
|
|
29
|
-
'error',
|
|
30
|
-
{
|
|
31
|
-
disallowArithmeticOperators: true,
|
|
32
|
-
},
|
|
33
|
-
], // eslint-config-airbnb-base@15.0.0; errors
|
|
34
|
-
'no-unused-vars': [
|
|
35
|
-
'error',
|
|
36
|
-
{
|
|
37
|
-
caughtErrors: 'none',
|
|
38
|
-
},
|
|
39
|
-
],
|
|
40
|
-
'no-useless-assignment': 'error', // ESLint 10 recommended candidate https://github.com/eslint/eslint/issues/19966
|
|
41
|
-
'valid-typeof': [
|
|
42
|
-
'error',
|
|
43
|
-
{
|
|
44
|
-
requireStringLiterals: true,
|
|
45
|
-
},
|
|
46
|
-
], // eslint-config-airbnb-base@15.0.0; errors
|
|
47
|
-
},
|
|
48
|
-
};
|
|
1
|
+
/** @type {import("eslint").Linter.Config} */
|
|
2
|
+
export default {
|
|
3
|
+
rules: {
|
|
4
|
+
'array-callback-return': [
|
|
5
|
+
'error',
|
|
6
|
+
{
|
|
7
|
+
allowImplicit: true,
|
|
8
|
+
},
|
|
9
|
+
], // eslint-config-airbnb-base@15.0.0; best-practices
|
|
10
|
+
'no-await-in-loop': 'error', // eslint-config-airbnb-base@15.0.0; errors
|
|
11
|
+
'no-cond-assign': ['error', 'always'], // eslint-config-airbnb-base@15.0.0; errors
|
|
12
|
+
'no-console': 'warn', // eslint-config-airbnb-base@15.0.0; errors
|
|
13
|
+
'no-continue': 'error', // eslint-config-airbnb-base@15.0.0; style
|
|
14
|
+
'no-constructor-return': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
15
|
+
'no-irregular-whitespace': [
|
|
16
|
+
'error',
|
|
17
|
+
{
|
|
18
|
+
skipComments: true,
|
|
19
|
+
skipRegExps: true,
|
|
20
|
+
skipTemplates: true,
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
'no-promise-executor-return': 'error', // eslint-config-airbnb-base@15.0.0; errors
|
|
24
|
+
'no-self-compare': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
25
|
+
'no-template-curly-in-string': 'error', // eslint-config-airbnb-base@15.0.0; errors
|
|
26
|
+
'no-unassigned-vars': 'error', // ESLint 10 recommended candidate https://github.com/eslint/eslint/issues/19966
|
|
27
|
+
'no-unmodified-loop-condition': 'error',
|
|
28
|
+
'no-unsafe-optional-chaining': [
|
|
29
|
+
'error',
|
|
30
|
+
{
|
|
31
|
+
disallowArithmeticOperators: true,
|
|
32
|
+
},
|
|
33
|
+
], // eslint-config-airbnb-base@15.0.0; errors
|
|
34
|
+
'no-unused-vars': [
|
|
35
|
+
'error',
|
|
36
|
+
{
|
|
37
|
+
caughtErrors: 'none',
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
'no-useless-assignment': 'error', // ESLint 10 recommended candidate https://github.com/eslint/eslint/issues/19966
|
|
41
|
+
'valid-typeof': [
|
|
42
|
+
'error',
|
|
43
|
+
{
|
|
44
|
+
requireStringLiterals: true,
|
|
45
|
+
},
|
|
46
|
+
], // eslint-config-airbnb-base@15.0.0; errors
|
|
47
|
+
},
|
|
48
|
+
};
|
|
@@ -1,148 +1,148 @@
|
|
|
1
|
-
/** @type {import("eslint").Linter.Config} */
|
|
2
|
-
export default {
|
|
3
|
-
rules: {
|
|
4
|
-
'arrow-body-style': 'error', // eslint-config-airbnb-base@15.0.0; es6
|
|
5
|
-
'block-scoped-var': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
6
|
-
camelcase: [
|
|
7
|
-
'error',
|
|
8
|
-
{
|
|
9
|
-
properties: 'never',
|
|
10
|
-
},
|
|
11
|
-
], // eslint-config-airbnb-base@15.0.0; style
|
|
12
|
-
'class-methods-use-this': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
13
|
-
'consistent-return': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
14
|
-
curly: 'error',
|
|
15
|
-
'default-case': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
16
|
-
'default-case-last': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
17
|
-
'default-param-last': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
18
|
-
'dot-notation': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
19
|
-
eqeqeq: 'error',
|
|
20
|
-
'func-names': 'warn', // eslint-config-airbnb-base@15.0.0; style
|
|
21
|
-
'func-style': 'error',
|
|
22
|
-
'grouped-accessor-pairs': ['error', 'getBeforeSet'],
|
|
23
|
-
'guard-for-in': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
24
|
-
'logical-assignment-operators': 'error',
|
|
25
|
-
'max-classes-per-file': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
26
|
-
'new-cap': 'error',
|
|
27
|
-
'no-alert': 'warn', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
28
|
-
'no-array-constructor': 'error', // eslint-config-airbnb-base@15.0.0; style
|
|
29
|
-
'no-bitwise': 'error', // eslint-config-airbnb-base@15.0.0; style
|
|
30
|
-
'no-caller': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
31
|
-
'no-else-return': 'error',
|
|
32
|
-
'no-empty': [
|
|
33
|
-
'error',
|
|
34
|
-
{
|
|
35
|
-
allowEmptyCatch: true,
|
|
36
|
-
},
|
|
37
|
-
], // ✅
|
|
38
|
-
'no-empty-function': 'error',
|
|
39
|
-
'no-empty-static-block': 'error',
|
|
40
|
-
'no-eval': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
41
|
-
'no-extend-native': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
42
|
-
'no-extra-bind': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
43
|
-
'no-extra-label': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
44
|
-
'no-implicit-coercion': 'error',
|
|
45
|
-
'no-implicit-globals': 'error',
|
|
46
|
-
'no-implied-eval': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
47
|
-
'no-invalid-this': 'error',
|
|
48
|
-
'no-iterator': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
49
|
-
'no-label-var': 'error', // eslint-config-airbnb-base@15.0.0; variables
|
|
50
|
-
'no-labels': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
51
|
-
'no-lone-blocks': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
52
|
-
'no-lonely-if': 'error', // eslint-config-airbnb-base@15.0.0; style
|
|
53
|
-
'no-loop-func': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
54
|
-
'no-multi-assign': 'error', // eslint-config-airbnb-base@15.0.0; style
|
|
55
|
-
'no-multi-str': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
56
|
-
'no-nested-ternary': 'error', // eslint-config-airbnb-base@15.0.0; style
|
|
57
|
-
'no-new': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
58
|
-
'no-new-func': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
59
|
-
'no-new-wrappers': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
60
|
-
'no-object-constructor': 'error',
|
|
61
|
-
'no-octal-escape': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
62
|
-
'no-param-reassign': [
|
|
63
|
-
'error',
|
|
64
|
-
{
|
|
65
|
-
props: false,
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
'no-plusplus': 'error', // eslint-config-airbnb-base@15.0.0; style
|
|
69
|
-
'no-proto': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
70
|
-
'no-restricted-globals': ['error', 'isFinite', 'isNaN'], // eslint-config-airbnb-base@15.0.0; variables
|
|
71
|
-
'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'], // eslint-config-airbnb-base@15.0.0; style
|
|
72
|
-
'no-return-assign': ['error', 'always'], // eslint-config-airbnb-base@15.0.0; best-practices
|
|
73
|
-
'no-script-url': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
74
|
-
'no-sequences': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
75
|
-
'no-shadow': 'error', // eslint-config-airbnb-base@15.0.0; variables
|
|
76
|
-
'no-throw-literal': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
77
|
-
'no-undef-init': 'error', // eslint-config-airbnb-base@15.0.0; variables
|
|
78
|
-
'no-underscore-dangle': 'error', // eslint-config-airbnb-base@15.0.0; style
|
|
79
|
-
'no-unneeded-ternary': [
|
|
80
|
-
'error',
|
|
81
|
-
{
|
|
82
|
-
defaultAssignment: false,
|
|
83
|
-
},
|
|
84
|
-
], // eslint-config-airbnb-base@15.0.0; style
|
|
85
|
-
'no-unused-expressions': [
|
|
86
|
-
'error',
|
|
87
|
-
{
|
|
88
|
-
allowShortCircuit: false,
|
|
89
|
-
allowTernary: false,
|
|
90
|
-
allowTaggedTemplates: false,
|
|
91
|
-
},
|
|
92
|
-
], // eslint-config-airbnb-base@15.0.0; best-practices
|
|
93
|
-
'no-use-before-define': 'error', // eslint-config-airbnb-base@15.0.0; variables
|
|
94
|
-
'no-useless-computed-key': 'error', // eslint-config-airbnb-base@15.0.0; es6
|
|
95
|
-
'no-useless-constructor': 'error', // eslint-config-airbnb-base@15.0.0; es6
|
|
96
|
-
'no-useless-rename': 'error', // eslint-config-airbnb-base@15.0.0; es6
|
|
97
|
-
'no-useless-call': 'error',
|
|
98
|
-
'no-useless-concat': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
99
|
-
'no-useless-return': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
100
|
-
'no-var': 'error', // eslint-config-airbnb-base@15.0.0; es6
|
|
101
|
-
'no-void': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
102
|
-
'object-shorthand': ['error', 'methods'],
|
|
103
|
-
'one-var': ['error', 'never'], // eslint-config-airbnb-base@15.0.0; style
|
|
104
|
-
'operator-assignment': ['error', 'always'], // eslint-config-airbnb-base@15.0.0; style
|
|
105
|
-
'prefer-arrow-callback': 'error', // eslint-config-airbnb-base@15.0.0; es6
|
|
106
|
-
'prefer-const': [
|
|
107
|
-
'error',
|
|
108
|
-
{
|
|
109
|
-
destructuring: 'any',
|
|
110
|
-
ignoreReadBeforeAssign: true,
|
|
111
|
-
},
|
|
112
|
-
], // eslint-config-airbnb-base@15.0.0; es6
|
|
113
|
-
'prefer-destructuring': [
|
|
114
|
-
'error',
|
|
115
|
-
{
|
|
116
|
-
VariableDeclarator: {
|
|
117
|
-
array: false,
|
|
118
|
-
object: true,
|
|
119
|
-
},
|
|
120
|
-
AssignmentExpression: {
|
|
121
|
-
array: true,
|
|
122
|
-
object: false,
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
], // eslint-config-airbnb-base@15.0.0; es6
|
|
126
|
-
'prefer-exponentiation-operator': 'error', // eslint-config-airbnb-base@15.0.0; style
|
|
127
|
-
'prefer-numeric-literals': 'error', // eslint-config-airbnb-base@15.0.0; es6
|
|
128
|
-
'prefer-object-has-own': 'error',
|
|
129
|
-
'prefer-object-spread': 'error', // eslint-config-airbnb-base@15.0.0; style
|
|
130
|
-
'prefer-promise-reject-errors': 'error',
|
|
131
|
-
'prefer-regex-literals': [
|
|
132
|
-
'error',
|
|
133
|
-
{
|
|
134
|
-
disallowRedundantWrapping: true,
|
|
135
|
-
},
|
|
136
|
-
], // eslint-config-airbnb-base@15.0.0; best-practices
|
|
137
|
-
'prefer-rest-params': 'error', // eslint-config-airbnb-base@15.0.0; es6
|
|
138
|
-
'prefer-spread': 'error', // eslint-config-airbnb-base@15.0.0; es6
|
|
139
|
-
'prefer-template': 'error', // eslint-config-airbnb-base@15.0.0; es6
|
|
140
|
-
'preserve-caught-error': 'error', // ESLint 10 recommended candidate https://github.com/eslint/eslint/issues/19966
|
|
141
|
-
radix: 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
142
|
-
'require-await': 'error',
|
|
143
|
-
'require-unicode-regexp': 'error',
|
|
144
|
-
strict: 'error',
|
|
145
|
-
'symbol-description': 'error', // eslint-config-airbnb-base@15.0.0; es6
|
|
146
|
-
yoda: 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
147
|
-
},
|
|
148
|
-
};
|
|
1
|
+
/** @type {import("eslint").Linter.Config} */
|
|
2
|
+
export default {
|
|
3
|
+
rules: {
|
|
4
|
+
'arrow-body-style': 'error', // eslint-config-airbnb-base@15.0.0; es6
|
|
5
|
+
'block-scoped-var': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
6
|
+
camelcase: [
|
|
7
|
+
'error',
|
|
8
|
+
{
|
|
9
|
+
properties: 'never',
|
|
10
|
+
},
|
|
11
|
+
], // eslint-config-airbnb-base@15.0.0; style
|
|
12
|
+
'class-methods-use-this': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
13
|
+
'consistent-return': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
14
|
+
curly: 'error',
|
|
15
|
+
'default-case': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
16
|
+
'default-case-last': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
17
|
+
'default-param-last': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
18
|
+
'dot-notation': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
19
|
+
eqeqeq: 'error',
|
|
20
|
+
'func-names': 'warn', // eslint-config-airbnb-base@15.0.0; style
|
|
21
|
+
'func-style': 'error',
|
|
22
|
+
'grouped-accessor-pairs': ['error', 'getBeforeSet'],
|
|
23
|
+
'guard-for-in': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
24
|
+
'logical-assignment-operators': 'error',
|
|
25
|
+
'max-classes-per-file': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
26
|
+
'new-cap': 'error',
|
|
27
|
+
'no-alert': 'warn', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
28
|
+
'no-array-constructor': 'error', // eslint-config-airbnb-base@15.0.0; style
|
|
29
|
+
'no-bitwise': 'error', // eslint-config-airbnb-base@15.0.0; style
|
|
30
|
+
'no-caller': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
31
|
+
'no-else-return': 'error',
|
|
32
|
+
'no-empty': [
|
|
33
|
+
'error',
|
|
34
|
+
{
|
|
35
|
+
allowEmptyCatch: true,
|
|
36
|
+
},
|
|
37
|
+
], // ✅
|
|
38
|
+
'no-empty-function': 'error',
|
|
39
|
+
'no-empty-static-block': 'error',
|
|
40
|
+
'no-eval': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
41
|
+
'no-extend-native': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
42
|
+
'no-extra-bind': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
43
|
+
'no-extra-label': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
44
|
+
'no-implicit-coercion': 'error',
|
|
45
|
+
'no-implicit-globals': 'error',
|
|
46
|
+
'no-implied-eval': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
47
|
+
'no-invalid-this': 'error',
|
|
48
|
+
'no-iterator': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
49
|
+
'no-label-var': 'error', // eslint-config-airbnb-base@15.0.0; variables
|
|
50
|
+
'no-labels': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
51
|
+
'no-lone-blocks': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
52
|
+
'no-lonely-if': 'error', // eslint-config-airbnb-base@15.0.0; style
|
|
53
|
+
'no-loop-func': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
54
|
+
'no-multi-assign': 'error', // eslint-config-airbnb-base@15.0.0; style
|
|
55
|
+
'no-multi-str': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
56
|
+
'no-nested-ternary': 'error', // eslint-config-airbnb-base@15.0.0; style
|
|
57
|
+
'no-new': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
58
|
+
'no-new-func': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
59
|
+
'no-new-wrappers': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
60
|
+
'no-object-constructor': 'error',
|
|
61
|
+
'no-octal-escape': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
62
|
+
'no-param-reassign': [
|
|
63
|
+
'error',
|
|
64
|
+
{
|
|
65
|
+
props: false,
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
'no-plusplus': 'error', // eslint-config-airbnb-base@15.0.0; style
|
|
69
|
+
'no-proto': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
70
|
+
'no-restricted-globals': ['error', 'isFinite', 'isNaN'], // eslint-config-airbnb-base@15.0.0; variables
|
|
71
|
+
'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'], // eslint-config-airbnb-base@15.0.0; style
|
|
72
|
+
'no-return-assign': ['error', 'always'], // eslint-config-airbnb-base@15.0.0; best-practices
|
|
73
|
+
'no-script-url': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
74
|
+
'no-sequences': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
75
|
+
'no-shadow': 'error', // eslint-config-airbnb-base@15.0.0; variables
|
|
76
|
+
'no-throw-literal': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
77
|
+
'no-undef-init': 'error', // eslint-config-airbnb-base@15.0.0; variables
|
|
78
|
+
'no-underscore-dangle': 'error', // eslint-config-airbnb-base@15.0.0; style
|
|
79
|
+
'no-unneeded-ternary': [
|
|
80
|
+
'error',
|
|
81
|
+
{
|
|
82
|
+
defaultAssignment: false,
|
|
83
|
+
},
|
|
84
|
+
], // eslint-config-airbnb-base@15.0.0; style
|
|
85
|
+
'no-unused-expressions': [
|
|
86
|
+
'error',
|
|
87
|
+
{
|
|
88
|
+
allowShortCircuit: false,
|
|
89
|
+
allowTernary: false,
|
|
90
|
+
allowTaggedTemplates: false,
|
|
91
|
+
},
|
|
92
|
+
], // eslint-config-airbnb-base@15.0.0; best-practices
|
|
93
|
+
'no-use-before-define': 'error', // eslint-config-airbnb-base@15.0.0; variables
|
|
94
|
+
'no-useless-computed-key': 'error', // eslint-config-airbnb-base@15.0.0; es6
|
|
95
|
+
'no-useless-constructor': 'error', // eslint-config-airbnb-base@15.0.0; es6
|
|
96
|
+
'no-useless-rename': 'error', // eslint-config-airbnb-base@15.0.0; es6
|
|
97
|
+
'no-useless-call': 'error',
|
|
98
|
+
'no-useless-concat': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
99
|
+
'no-useless-return': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
100
|
+
'no-var': 'error', // eslint-config-airbnb-base@15.0.0; es6
|
|
101
|
+
'no-void': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
102
|
+
'object-shorthand': ['error', 'methods'],
|
|
103
|
+
'one-var': ['error', 'never'], // eslint-config-airbnb-base@15.0.0; style
|
|
104
|
+
'operator-assignment': ['error', 'always'], // eslint-config-airbnb-base@15.0.0; style
|
|
105
|
+
'prefer-arrow-callback': 'error', // eslint-config-airbnb-base@15.0.0; es6
|
|
106
|
+
'prefer-const': [
|
|
107
|
+
'error',
|
|
108
|
+
{
|
|
109
|
+
destructuring: 'any',
|
|
110
|
+
ignoreReadBeforeAssign: true,
|
|
111
|
+
},
|
|
112
|
+
], // eslint-config-airbnb-base@15.0.0; es6
|
|
113
|
+
'prefer-destructuring': [
|
|
114
|
+
'error',
|
|
115
|
+
{
|
|
116
|
+
VariableDeclarator: {
|
|
117
|
+
array: false,
|
|
118
|
+
object: true,
|
|
119
|
+
},
|
|
120
|
+
AssignmentExpression: {
|
|
121
|
+
array: true,
|
|
122
|
+
object: false,
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
], // eslint-config-airbnb-base@15.0.0; es6
|
|
126
|
+
'prefer-exponentiation-operator': 'error', // eslint-config-airbnb-base@15.0.0; style
|
|
127
|
+
'prefer-numeric-literals': 'error', // eslint-config-airbnb-base@15.0.0; es6
|
|
128
|
+
'prefer-object-has-own': 'error',
|
|
129
|
+
'prefer-object-spread': 'error', // eslint-config-airbnb-base@15.0.0; style
|
|
130
|
+
'prefer-promise-reject-errors': 'error',
|
|
131
|
+
'prefer-regex-literals': [
|
|
132
|
+
'error',
|
|
133
|
+
{
|
|
134
|
+
disallowRedundantWrapping: true,
|
|
135
|
+
},
|
|
136
|
+
], // eslint-config-airbnb-base@15.0.0; best-practices
|
|
137
|
+
'prefer-rest-params': 'error', // eslint-config-airbnb-base@15.0.0; es6
|
|
138
|
+
'prefer-spread': 'error', // eslint-config-airbnb-base@15.0.0; es6
|
|
139
|
+
'prefer-template': 'error', // eslint-config-airbnb-base@15.0.0; es6
|
|
140
|
+
'preserve-caught-error': 'error', // ESLint 10 recommended candidate https://github.com/eslint/eslint/issues/19966
|
|
141
|
+
radix: 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
142
|
+
'require-await': 'error',
|
|
143
|
+
'require-unicode-regexp': 'error',
|
|
144
|
+
strict: 'error',
|
|
145
|
+
'symbol-description': 'error', // eslint-config-airbnb-base@15.0.0; es6
|
|
146
|
+
yoda: 'error', // eslint-config-airbnb-base@15.0.0; best-practices
|
|
147
|
+
},
|
|
148
|
+
};
|
package/rules/functional.js
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
/* eslint-disable jsdoc/lines-before-block */
|
|
2
|
-
|
|
3
|
-
/** @type {import("eslint").Linter.Config} */
|
|
4
|
-
export default {
|
|
5
|
-
rules: {
|
|
6
|
-
/**
|
|
7
|
-
* Currying
|
|
8
|
-
*/
|
|
9
|
-
'functional/functional-parameters': [
|
|
10
|
-
'error',
|
|
11
|
-
{
|
|
12
|
-
enforceParameterCount: false,
|
|
13
|
-
},
|
|
14
|
-
] /* ☑️ ✅ 🔒 */,
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* No Exceptions
|
|
18
|
-
*/
|
|
19
|
-
/* no-promise-reject */
|
|
20
|
-
'functional/no-throw-statements': 'off' /* ☑️ ✅ 🔒 */,
|
|
21
|
-
/* 🔒 no-try-statements */
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* No Mutations
|
|
25
|
-
*/
|
|
26
|
-
'functional/immutable-data': 'off' /* ☑️ ✅ 🔒 */,
|
|
27
|
-
'functional/no-let': 'off' /* ☑️ ✅ 🔒 */,
|
|
28
|
-
'functional/prefer-immutable-types': 'off' /* ☑️ ✅ 🔒 */,
|
|
29
|
-
/* [❌ Deprecated] prefer-readonly-type */
|
|
30
|
-
/* ☑️ ✅ 🔒 type-declaration-immutability */
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* No Other Paradigms
|
|
34
|
-
*/
|
|
35
|
-
'functional/no-class-inheritance': 'off' /* ☑️ ✅ 🔒 */,
|
|
36
|
-
'functional/no-classes': 'off' /* ✅ 🔒 */,
|
|
37
|
-
/* ☑️ ✅ 🔒 no-mixed-types */
|
|
38
|
-
/* 🔒 no-this-expressions */
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* No Statements
|
|
42
|
-
*/
|
|
43
|
-
'functional/no-conditional-statements': 'off' /* ✅ 🔒 */,
|
|
44
|
-
'functional/no-expression-statements': 'off' /* ✅ 🔒 */,
|
|
45
|
-
/* ☑️ ✅ 🔒 no-loop-statements */
|
|
46
|
-
'functional/no-return-void': 'off' /* ☑️ ✅ 🔒 */,
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Stylistic
|
|
50
|
-
*/
|
|
51
|
-
/* 🎨 prefer-property-signatures */
|
|
52
|
-
/* 🎨(⚠️) prefer-tacit */
|
|
53
|
-
/* 🎨 readonly-type */
|
|
54
|
-
},
|
|
55
|
-
};
|
|
1
|
+
/* eslint-disable jsdoc/lines-before-block */
|
|
2
|
+
|
|
3
|
+
/** @type {import("eslint").Linter.Config} */
|
|
4
|
+
export default {
|
|
5
|
+
rules: {
|
|
6
|
+
/**
|
|
7
|
+
* Currying
|
|
8
|
+
*/
|
|
9
|
+
'functional/functional-parameters': [
|
|
10
|
+
'error',
|
|
11
|
+
{
|
|
12
|
+
enforceParameterCount: false,
|
|
13
|
+
},
|
|
14
|
+
] /* ☑️ ✅ 🔒 */,
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* No Exceptions
|
|
18
|
+
*/
|
|
19
|
+
/* no-promise-reject */
|
|
20
|
+
'functional/no-throw-statements': 'off' /* ☑️ ✅ 🔒 */,
|
|
21
|
+
/* 🔒 no-try-statements */
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* No Mutations
|
|
25
|
+
*/
|
|
26
|
+
'functional/immutable-data': 'off' /* ☑️ ✅ 🔒 */,
|
|
27
|
+
'functional/no-let': 'off' /* ☑️ ✅ 🔒 */,
|
|
28
|
+
'functional/prefer-immutable-types': 'off' /* ☑️ ✅ 🔒 */,
|
|
29
|
+
/* [❌ Deprecated] prefer-readonly-type */
|
|
30
|
+
/* ☑️ ✅ 🔒 type-declaration-immutability */
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* No Other Paradigms
|
|
34
|
+
*/
|
|
35
|
+
'functional/no-class-inheritance': 'off' /* ☑️ ✅ 🔒 */,
|
|
36
|
+
'functional/no-classes': 'off' /* ✅ 🔒 */,
|
|
37
|
+
/* ☑️ ✅ 🔒 no-mixed-types */
|
|
38
|
+
/* 🔒 no-this-expressions */
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* No Statements
|
|
42
|
+
*/
|
|
43
|
+
'functional/no-conditional-statements': 'off' /* ✅ 🔒 */,
|
|
44
|
+
'functional/no-expression-statements': 'off' /* ✅ 🔒 */,
|
|
45
|
+
/* ☑️ ✅ 🔒 no-loop-statements */
|
|
46
|
+
'functional/no-return-void': 'off' /* ☑️ ✅ 🔒 */,
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Stylistic
|
|
50
|
+
*/
|
|
51
|
+
/* 🎨 prefer-property-signatures */
|
|
52
|
+
/* 🎨(⚠️) prefer-tacit */
|
|
53
|
+
/* 🎨 readonly-type */
|
|
54
|
+
},
|
|
55
|
+
};
|