@w5s/eslint-config 1.0.0-alpha.9 → 1.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.
Files changed (58) hide show
  1. package/README.md +7 -7
  2. package/es.js +1 -20
  3. package/ignore.js +1 -3
  4. package/index.js +10 -27
  5. package/jest.js +15 -2
  6. package/json.js +8 -7
  7. package/lib/_rule.d.ts +2 -0
  8. package/lib/_rule.js +7 -0
  9. package/lib/es/base.d.ts +4 -0
  10. package/lib/es/base.js +68 -0
  11. package/lib/es/import.d.ts +3 -0
  12. package/lib/es/import.js +57 -0
  13. package/lib/es/jsdoc.d.ts +3 -0
  14. package/lib/es/jsdoc.js +20 -0
  15. package/lib/es/promise.d.ts +3 -0
  16. package/lib/es/promise.js +12 -0
  17. package/lib/es/unicorn.d.ts +3 -0
  18. package/lib/es/unicorn.js +73 -0
  19. package/lib/es.d.ts +3 -0
  20. package/lib/es.js +15 -0
  21. package/lib/ignore.d.ts +3 -0
  22. package/lib/ignore.js +40 -0
  23. package/lib/jest.d.ts +3 -0
  24. package/lib/jest.js +57 -0
  25. package/lib/jsonc.d.ts +3 -0
  26. package/lib/jsonc.js +183 -0
  27. package/lib/prettier.d.ts +3 -0
  28. package/lib/prettier.js +43 -0
  29. package/lib/typescript.d.ts +3 -0
  30. package/lib/typescript.js +248 -0
  31. package/lib/yml.d.ts +3 -0
  32. package/lib/yml.js +7 -0
  33. package/package.json +58 -39
  34. package/src/_rule.ts +5 -0
  35. package/src/es/base.ts +80 -0
  36. package/src/es/import.ts +61 -0
  37. package/src/es/jsdoc.ts +22 -0
  38. package/src/es/promise.ts +13 -0
  39. package/src/es/unicorn.ts +75 -0
  40. package/src/es.ts +18 -0
  41. package/src/ignore.ts +41 -0
  42. package/src/jest.ts +61 -0
  43. package/src/jsonc.ts +187 -0
  44. package/src/prettier.ts +47 -0
  45. package/{rules/typescript.js → src/typescript.ts} +105 -98
  46. package/src/yml.ts +8 -0
  47. package/ts.js +12 -33
  48. package/yml.js +9 -0
  49. package/functional.js +0 -51
  50. package/react.js +0 -10
  51. package/rules/_rule.js +0 -78
  52. package/rules/base.js +0 -45
  53. package/rules/import.js +0 -23
  54. package/rules/jest.js +0 -41
  55. package/rules/jsdoc.js +0 -9
  56. package/rules/prettier.js +0 -14
  57. package/rules/react.js +0 -176
  58. package/rules/unicorn.js +0 -61
package/lib/jsonc.js ADDED
@@ -0,0 +1,183 @@
1
+ "use strict";
2
+ // https://github.com/keithamus/sort-package-json/blob/master/defaultRules.md
3
+ const config = {
4
+ extends: ['plugin:jsonc/recommended-with-jsonc', 'plugin:jsonc/prettier'],
5
+ overrides: [
6
+ {
7
+ files: ['tsconfig*.json'],
8
+ rules: {
9
+ 'jsonc/sort-keys': [
10
+ 'error',
11
+ {
12
+ order: ['$schema', 'display', 'extends', 'compilerOptions', 'include', 'exclude', 'files', 'references'],
13
+ pathPattern: '^$',
14
+ },
15
+ {
16
+ order: { type: 'asc' },
17
+ pathPattern: '.*',
18
+ },
19
+ ],
20
+ },
21
+ },
22
+ {
23
+ files: ['package.json'],
24
+ rules: {
25
+ 'jsonc/sort-keys': [
26
+ 'error',
27
+ {
28
+ order: [
29
+ '$schema',
30
+ 'name',
31
+ 'displayName',
32
+ 'version',
33
+ 'private',
34
+ 'description',
35
+ 'categories',
36
+ 'keywords',
37
+ 'homepage',
38
+ 'bugs',
39
+ 'repository',
40
+ 'funding',
41
+ 'license',
42
+ 'qna',
43
+ 'author',
44
+ 'maintainers',
45
+ 'contributors',
46
+ 'publisher',
47
+ 'sideEffects',
48
+ 'type',
49
+ 'imports',
50
+ 'exports',
51
+ 'main',
52
+ 'svelte',
53
+ 'umd:main',
54
+ 'jsdelivr',
55
+ 'unpkg',
56
+ 'module',
57
+ 'source',
58
+ 'jsnext:main',
59
+ 'browser',
60
+ 'react-native',
61
+ 'types',
62
+ 'typesVersions',
63
+ 'typings',
64
+ 'style',
65
+ 'example',
66
+ 'examplestyle',
67
+ 'assets',
68
+ 'bin',
69
+ 'man',
70
+ 'directories',
71
+ 'files',
72
+ 'workspaces',
73
+ 'binary',
74
+ 'scripts',
75
+ 'betterScripts',
76
+ 'contributes',
77
+ 'activationEvents',
78
+ 'husky',
79
+ 'simple-git-hooks',
80
+ 'pre-commit',
81
+ 'commitlint',
82
+ 'lint-staged',
83
+ 'config',
84
+ 'nodemonConfig',
85
+ 'browserify',
86
+ 'babel',
87
+ 'browserslist',
88
+ 'xo',
89
+ 'prettier',
90
+ 'eslintConfig',
91
+ 'eslintIgnore',
92
+ 'npmpackagejsonlint',
93
+ 'release',
94
+ 'remarkConfig',
95
+ 'stylelint',
96
+ 'ava',
97
+ 'jest',
98
+ 'mocha',
99
+ 'nyc',
100
+ 'tap',
101
+ 'resolutions',
102
+ 'dependencies',
103
+ 'devDependencies',
104
+ 'dependenciesMeta',
105
+ 'peerDependencies',
106
+ 'peerDependenciesMeta',
107
+ 'optionalDependencies',
108
+ 'bundledDependencies',
109
+ 'bundleDependencies',
110
+ 'extensionPack',
111
+ 'extensionDependencies',
112
+ 'flat',
113
+ 'packageManager',
114
+ 'engines',
115
+ 'engineStrict',
116
+ 'volta',
117
+ 'languageName',
118
+ 'os',
119
+ 'cpu',
120
+ 'preferGlobal',
121
+ 'publishConfig',
122
+ 'icon',
123
+ 'badges',
124
+ 'galleryBanner',
125
+ 'preview',
126
+ 'markdown',
127
+ ],
128
+ pathPattern: '^$',
129
+ },
130
+ {
131
+ order: ['url', 'email'],
132
+ pathPattern: `^bugs$`,
133
+ },
134
+ ...['repository', 'funding', 'license', 'author'].map((key) => ({
135
+ order: ['type', 'name', 'email', 'url'],
136
+ pathPattern: `^${key}$`,
137
+ })),
138
+ ...['scripts', 'betterScripts'].map((key) => ({
139
+ order: { type: 'asc' },
140
+ pathPattern: `^${key}$`,
141
+ })),
142
+ ...[
143
+ 'bin',
144
+ 'contributes',
145
+ 'commitlint',
146
+ 'config',
147
+ 'nodemonConfig',
148
+ 'browserify',
149
+ 'babel',
150
+ 'xo',
151
+ 'release',
152
+ 'remarkConfig',
153
+ 'ava',
154
+ 'jest',
155
+ 'mocha',
156
+ 'nyc',
157
+ 'tap',
158
+ 'resolutions',
159
+ 'engines',
160
+ 'engineStrict',
161
+ 'preferGlobal',
162
+ 'publishConfig',
163
+ 'galleryBanner',
164
+ ].map((key) => ({
165
+ order: { type: 'asc' },
166
+ pathPattern: `^${key}$`,
167
+ })),
168
+ {
169
+ order: { type: 'asc' },
170
+ pathPattern: '^(?:dev|peer|optional|bundled|extension)?[Dd]ependencies$',
171
+ },
172
+ {
173
+ order: ['types', 'require', 'import'],
174
+ pathPattern: '^exports.*$',
175
+ },
176
+ ],
177
+ },
178
+ },
179
+ ],
180
+ parser: 'jsonc-eslint-parser',
181
+ plugins: ['jsonc'],
182
+ };
183
+ module.exports = config;
@@ -0,0 +1,3 @@
1
+ import type eslint from 'eslint';
2
+ declare const config: eslint.Linter.Config;
3
+ export = config;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ /* eslint-disable global-require */
3
+ /* eslint-disable import/no-dynamic-require */
4
+ /* eslint-disable @typescript-eslint/no-var-requires */
5
+ /* eslint-disable @typescript-eslint/no-require-imports */
6
+ const getPackageScope = () => {
7
+ try {
8
+ const { name } = require('../package.json');
9
+ const prefixMatch = (name ?? '').match(/(@\w+)\//);
10
+ const packageScope = prefixMatch == null ? undefined : prefixMatch[1];
11
+ return packageScope;
12
+ }
13
+ catch (error_) {
14
+ // eslint-disable-next-line no-console
15
+ console.warn(error_);
16
+ return undefined;
17
+ }
18
+ };
19
+ const getPrettierConfig = (moduleName) => {
20
+ try {
21
+ const moduleConfig = require(moduleName);
22
+ return moduleConfig;
23
+ }
24
+ catch {
25
+ return undefined;
26
+ }
27
+ };
28
+ // Try require '@my-organization/prettier-config'
29
+ const getPrettierConfigDefault = () => {
30
+ const defaultConfig = {
31
+ trailingComma: 'es5',
32
+ };
33
+ const packageScope = getPackageScope();
34
+ return (packageScope == null ? undefined : getPrettierConfig(`${packageScope}/prettier-config`)) ?? defaultConfig;
35
+ };
36
+ const config = {
37
+ extends: ['prettier'],
38
+ plugins: ['prettier'],
39
+ rules: {
40
+ 'prettier/prettier': ['error', getPrettierConfigDefault()],
41
+ },
42
+ };
43
+ module.exports = config;
@@ -0,0 +1,3 @@
1
+ import type eslint from 'eslint';
2
+ declare const config: eslint.Linter.Config;
3
+ export = config;
@@ -0,0 +1,248 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ const dev_1 = require("@w5s/dev");
6
+ const _rule_js_1 = require("./_rule.js");
7
+ const base_js_1 = __importDefault(require("./es/base.js"));
8
+ const import_js_1 = __importDefault(require("./es/import.js"));
9
+ // Inspired by https://github.com/iamturns/eslint-config-airbnb-typescript/blob/master/lib/shared.js
10
+ // Fix Hack : TS plugin seems to modify the rules
11
+ const deepClone = (anyValue) => JSON.parse(JSON.stringify(anyValue));
12
+ const baseRules = deepClone(base_js_1.default.rules);
13
+ const baseImportRules = deepClone(import_js_1.default.rules);
14
+ const duplicateTSC = 'off'; // = "off because tsc already checks that"
15
+ const config = dev_1.ESLintConfig.concat(
16
+ /**
17
+ * Plugin rules
18
+ */
19
+ {
20
+ extends: ['plugin:@typescript-eslint/recommended-requiring-type-checking'],
21
+ parser: '@typescript-eslint/parser',
22
+ parserOptions: {
23
+ sourceType: 'module',
24
+ },
25
+ plugins: ['@typescript-eslint', 'import'],
26
+ rules: {
27
+ '@typescript-eslint/adjacent-overload-signatures': 'error',
28
+ '@typescript-eslint/ban-ts-comment': [
29
+ 'warn',
30
+ {
31
+ minimumDescriptionLength: 3,
32
+ 'ts-check': false,
33
+ 'ts-expect-error': 'allow-with-description',
34
+ 'ts-ignore': 'allow-with-description',
35
+ 'ts-nocheck': true,
36
+ },
37
+ ],
38
+ '@typescript-eslint/ban-types': 'error',
39
+ '@typescript-eslint/brace-style': baseRules['brace-style'],
40
+ '@typescript-eslint/comma-dangle': [
41
+ baseRules['comma-dangle'][0],
42
+ {
43
+ ...baseRules['comma-dangle'][1],
44
+ enums: baseRules['comma-dangle'][1].arrays,
45
+ generics: baseRules['comma-dangle'][1].arrays,
46
+ tuples: baseRules['comma-dangle'][1].arrays,
47
+ },
48
+ ],
49
+ '@typescript-eslint/comma-spacing': baseRules['comma-spacing'],
50
+ '@typescript-eslint/consistent-type-assertions': [
51
+ 'error',
52
+ { assertionStyle: 'as', objectLiteralTypeAssertions: 'never' },
53
+ ],
54
+ '@typescript-eslint/default-param-last': baseRules['default-param-last'],
55
+ '@typescript-eslint/dot-notation': baseRules['dot-notation'],
56
+ '@typescript-eslint/explicit-function-return-type': 'off',
57
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
58
+ '@typescript-eslint/func-call-spacing': baseRules['func-call-spacing'],
59
+ '@typescript-eslint/indent': baseRules.indent,
60
+ '@typescript-eslint/keyword-spacing': baseRules['keyword-spacing'],
61
+ '@typescript-eslint/lines-between-class-members': baseRules['lines-between-class-members'],
62
+ '@typescript-eslint/member-delimiter-style': 'error',
63
+ '@typescript-eslint/naming-convention': [
64
+ 'error',
65
+ {
66
+ format: ['PascalCase', 'camelCase'],
67
+ leadingUnderscore: 'allow',
68
+ selector: 'default',
69
+ trailingUnderscore: 'allow',
70
+ },
71
+ {
72
+ format: ['PascalCase', 'camelCase', 'UPPER_CASE'],
73
+ leadingUnderscore: 'allow',
74
+ selector: 'variable',
75
+ trailingUnderscore: 'allow',
76
+ },
77
+ {
78
+ format: ['PascalCase', 'camelCase', 'UPPER_CASE'],
79
+ leadingUnderscore: 'allowSingleOrDouble',
80
+ selector: 'memberLike',
81
+ trailingUnderscore: 'allowDouble',
82
+ },
83
+ {
84
+ format: ['PascalCase'],
85
+ selector: 'typeLike',
86
+ },
87
+ ],
88
+ '@typescript-eslint/no-array-constructor': baseRules['no-array-constructor'],
89
+ '@typescript-eslint/no-base-to-string': 'error',
90
+ '@typescript-eslint/no-dupe-class-members': baseRules['no-dupe-class-members'],
91
+ '@typescript-eslint/no-empty-function': baseRules['no-empty-function'],
92
+ '@typescript-eslint/no-empty-interface': ['error', { allowSingleExtends: true }],
93
+ '@typescript-eslint/no-explicit-any': 'off',
94
+ '@typescript-eslint/no-extra-parens': baseRules['no-extra-parens'],
95
+ '@typescript-eslint/no-extra-semi': baseRules['no-extra-semi'],
96
+ '@typescript-eslint/no-implicit-any-catch': 'error',
97
+ '@typescript-eslint/no-inferrable-types': 'error',
98
+ '@typescript-eslint/no-loop-func': baseRules['no-loop-func'],
99
+ '@typescript-eslint/no-loss-of-precision': baseRules['no-loss-of-precision'],
100
+ '@typescript-eslint/no-magic-numbers': baseRules['no-magic-numbers'],
101
+ '@typescript-eslint/no-misused-new': 'error',
102
+ '@typescript-eslint/no-namespace': 'off',
103
+ '@typescript-eslint/no-non-null-assertion': 'error',
104
+ '@typescript-eslint/no-redeclare': (0, _rule_js_1.fixme)(baseRules['no-redeclare']),
105
+ '@typescript-eslint/no-require-imports': 'error',
106
+ '@typescript-eslint/no-shadow': baseRules['no-shadow'],
107
+ '@typescript-eslint/no-this-alias': 'error',
108
+ '@typescript-eslint/no-throw-literal': baseRules['no-throw-literal'],
109
+ '@typescript-eslint/no-unnecessary-condition': 'error',
110
+ '@typescript-eslint/no-unsafe-argument': 'error',
111
+ '@typescript-eslint/no-unused-expressions': baseRules['no-unused-expressions'],
112
+ '@typescript-eslint/no-unused-vars': baseRules['no-unused-vars'],
113
+ '@typescript-eslint/no-use-before-define': baseRules['no-use-before-define'],
114
+ '@typescript-eslint/no-useless-constructor': baseRules['no-useless-constructor'],
115
+ '@typescript-eslint/no-var-requires': 'error',
116
+ '@typescript-eslint/object-curly-spacing': baseRules['object-curly-spacing'],
117
+ '@typescript-eslint/prefer-namespace-keyword': 'error',
118
+ '@typescript-eslint/prefer-reduce-type-parameter': 'error',
119
+ '@typescript-eslint/quotes': baseRules.quotes,
120
+ '@typescript-eslint/require-await': baseRules['require-await'],
121
+ '@typescript-eslint/return-await': baseRules['no-return-await'],
122
+ '@typescript-eslint/semi': baseRules.semi,
123
+ '@typescript-eslint/space-before-function-paren': baseRules['space-before-function-paren'],
124
+ '@typescript-eslint/space-infix-ops': baseRules['space-infix-ops'],
125
+ '@typescript-eslint/strict-boolean-expressions': [
126
+ 'error',
127
+ {
128
+ allowNullableObject: false,
129
+ allowNumber: false,
130
+ allowString: false,
131
+ },
132
+ ],
133
+ '@typescript-eslint/switch-exhaustiveness-check': 'error',
134
+ '@typescript-eslint/triple-slash-reference': 'error',
135
+ '@typescript-eslint/type-annotation-spacing': 'error',
136
+ },
137
+ },
138
+ /**
139
+ * JSDoc overrides
140
+ */
141
+ {
142
+ rules: {
143
+ 'jsdoc/no-types': 'error',
144
+ 'jsdoc/require-param': 'off',
145
+ 'jsdoc/require-param-type': 'off',
146
+ 'jsdoc/require-returns': 'off',
147
+ 'jsdoc/require-returns-type': 'off',
148
+ },
149
+ },
150
+ /**
151
+ * Import overrides
152
+ */
153
+ {
154
+ rules: {
155
+ 'import/extensions': [
156
+ baseImportRules['import/extensions'][0],
157
+ baseImportRules['import/extensions'][1],
158
+ {
159
+ ...baseImportRules['import/extensions'][2],
160
+ ts: 'never',
161
+ tsx: 'never',
162
+ },
163
+ ],
164
+ 'import/no-extraneous-dependencies': [
165
+ baseImportRules['import/no-extraneous-dependencies'][0],
166
+ {
167
+ ...baseImportRules['import/no-extraneous-dependencies'][1],
168
+ devDependencies: baseImportRules['import/no-extraneous-dependencies'][1].devDependencies.reduce((result, devDep) => {
169
+ const toAppend = [devDep];
170
+ const devDepWithTs = devDep.replace(/\bjs(x?)\b/g, 'ts$1');
171
+ if (devDepWithTs !== devDep) {
172
+ toAppend.push(devDepWithTs);
173
+ }
174
+ return [...result, ...toAppend];
175
+ }, []),
176
+ },
177
+ ],
178
+ },
179
+ },
180
+ /**
181
+ * Disabled rules
182
+ */
183
+ {
184
+ // https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md#eslint-plugin-import
185
+ rules: {
186
+ 'brace-style': 'off',
187
+ camelcase: 'off',
188
+ 'comma-dangle': 'off',
189
+ 'comma-spacing': 'off',
190
+ 'constructor-super': 'off',
191
+ 'default-param-last': 'off',
192
+ 'dot-notation': 'off',
193
+ 'func-call-spacing': 'off',
194
+ 'getter-return': 'off',
195
+ 'import/default': duplicateTSC,
196
+ 'import/export': (0, _rule_js_1.fixme)('error'),
197
+ 'import/named': duplicateTSC,
198
+ 'import/namespace': duplicateTSC,
199
+ 'import/no-named-as-default-member': duplicateTSC,
200
+ 'import/no-unresolved': duplicateTSC,
201
+ indent: 'off',
202
+ 'keyword-spacing': 'off',
203
+ 'lines-between-class-members': 'off',
204
+ 'no-array-constructor': 'off',
205
+ 'no-const-assign': 'off',
206
+ 'no-dupe-args': 'off',
207
+ 'no-dupe-class-members': 'off',
208
+ 'no-dupe-keys': 'off',
209
+ 'no-empty-function': 'off',
210
+ 'no-extra-parens': 'off',
211
+ 'no-extra-semi': 'off',
212
+ 'no-func-assign': 'off',
213
+ 'no-implied-eval': 'off',
214
+ 'no-import-assign': 'off',
215
+ 'no-inner-declarations': (0, _rule_js_1.fixme)('error'),
216
+ 'no-loop-func': 'off',
217
+ 'no-loss-of-precision': 'off',
218
+ 'no-magic-numbers': 'off',
219
+ 'no-new-func': 'off',
220
+ 'no-new-symbol': 'off',
221
+ 'no-obj-calls': 'off',
222
+ 'no-redeclare': 'off',
223
+ 'no-return-await': 'off',
224
+ 'no-setter-return': 'off',
225
+ 'no-shadow': 'off',
226
+ 'no-this-before-super': 'off',
227
+ 'no-throw-literal': 'off',
228
+ 'no-undef': 'off',
229
+ 'no-unreachable': 'off',
230
+ 'no-unsafe-negation': 'off',
231
+ 'no-unused-expressions': 'off',
232
+ 'no-unused-vars': 'off',
233
+ 'no-use-before-define': 'off',
234
+ 'no-useless-constructor': 'off',
235
+ 'no-var': 'error',
236
+ 'object-curly-spacing': 'off',
237
+ 'prefer-const': 'error',
238
+ 'prefer-rest-params': 'error',
239
+ 'prefer-spread': 'error',
240
+ quotes: 'off',
241
+ 'require-await': 'off',
242
+ semi: 'off',
243
+ 'space-before-function-paren': 'off',
244
+ 'space-infix-ops': 'off',
245
+ 'valid-typeof': 'off',
246
+ },
247
+ });
248
+ module.exports = config;
package/lib/yml.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import type eslint from 'eslint';
2
+ declare const config: eslint.Linter.Config;
3
+ export = config;
package/lib/yml.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ const config = {
3
+ extends: ['plugin:yml/standard', 'plugin:yml/prettier'],
4
+ parser: 'yaml-eslint-parser',
5
+ plugins: ['yml'],
6
+ };
7
+ module.exports = config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w5s/eslint-config",
3
- "version": "1.0.0-alpha.9",
3
+ "version": "1.0.0",
4
4
  "description": "ESLint configuration presets",
5
5
  "keywords": [
6
6
  "eslint",
@@ -13,75 +13,94 @@
13
13
  },
14
14
  "repository": {
15
15
  "type": "git",
16
- "url": "https://github.com/w5s/project-config.git",
16
+ "url": "git@github.com:w5s/project-config.git",
17
17
  "directory": "packages/eslint-config"
18
18
  },
19
19
  "license": "MIT",
20
20
  "author": "Julien Polo <julien.polo@gmail.com>",
21
+ "type": "commonjs",
21
22
  "main": "index.js",
22
23
  "files": [
24
+ "lib/**/!(*.spec).d.ts",
25
+ "lib/**/!(*.spec).js.map",
26
+ "lib/**/!(*.spec).js",
27
+ "src/**/!(*.spec).ts",
28
+ "!example/**/*",
29
+ "!*.cjs",
30
+ "index.js",
31
+ "index.d.ts",
23
32
  "*.js",
24
33
  "rules/*.js"
25
34
  ],
26
35
  "scripts": {
27
- "build": "npm-run-all -p 'build:*'",
28
- "build:empty": ":",
29
- "docs": "md-magic --path '**/*.md' --ignore='node_modules'",
30
- "format": "eslint . --fix",
31
- "lint": "eslint .",
32
- "test": "scripts/test"
36
+ "build": "concurrently \"npm:build:*\" \":\"",
37
+ "build:tsc": "tsc -b tsconfig.build.json",
38
+ "clean": "concurrently \"npm:clean:*\" \":\"",
39
+ "clean:tsc": "rm -rf lib",
40
+ "docs": "node ../../markdown.mjs",
41
+ "format": "concurrently \"npm:format:*\" \":\"",
42
+ "format:src": "eslint . --fix --ext=mjs,cjs,js,jsx,ts,tsx,json,jsonc,json5,yml,yaml",
43
+ "lint": "concurrently \"npm:lint:*\" \":\"",
44
+ "lint:src": "eslint . --ext=mjs,cjs,js,jsx,ts,tsx,json,jsonc,json5,yml,yaml",
45
+ "prepare": "concurrently \"npm:prepare:*\" \":\"",
46
+ "prepublishOnly": "npm run clean;npm run build",
47
+ "spellcheck": "cspell --no-progress '**'",
48
+ "test": "concurrently \"npm:test:*\" \":\"",
49
+ "test:script": "scripts/test",
50
+ "test_:rule-coverage": "eslint-find-rules --unused"
33
51
  },
34
- "eslintConfig": {
35
- "rules": {
36
- "sort-keys-fix/sort-keys-fix": "error"
37
- }
38
- },
39
- "eslintIgnore": [
40
- "__tests__"
41
- ],
42
52
  "dependencies": {
43
- "@babel/eslint-parser": "^7.0.0",
44
- "@babel/plugin-syntax-class-properties": "^7.0.0",
45
- "@babel/plugin-syntax-jsx": "^7.0.0",
53
+ "@rushstack/eslint-patch": "^1.1.0",
46
54
  "@typescript-eslint/eslint-plugin": "^5.0.0",
47
55
  "@typescript-eslint/parser": "^5.0.0",
56
+ "@w5s/dev": "^1.0.0",
57
+ "@w5s/prettier-config": "^1.0.14",
48
58
  "eslint-config-airbnb-base": "^15.0.0",
49
59
  "eslint-config-prettier": "^8.0.0",
50
- "eslint-plugin-functional": "^4.2.0",
51
60
  "eslint-plugin-import": "^2.25.0",
52
- "eslint-plugin-jest": "^26.0.0",
53
- "eslint-plugin-jsdoc": "^37.0.0",
54
- "eslint-plugin-json-format": "^2.0.1",
61
+ "eslint-plugin-jest": "^27.0.0",
62
+ "eslint-plugin-jsdoc": "^40.0.0",
63
+ "eslint-plugin-jsonc": "^2.4.0",
55
64
  "eslint-plugin-prettier": "^4.0.0",
56
- "eslint-plugin-react": "^7.28.0",
57
- "eslint-plugin-total-functions": "^5.0.0",
58
- "eslint-plugin-unicorn": "^41.0.0"
65
+ "eslint-plugin-promise": "^6.0.0",
66
+ "eslint-plugin-unicorn": "^45.0.0",
67
+ "eslint-plugin-yml": "^1.1.0",
68
+ "find-up": "^5.0.0",
69
+ "parse-gitignore": "^2.0.0"
59
70
  },
60
71
  "devDependencies": {
61
- "@babel/eslint-parser": "7.17.0",
62
- "@types/eslint": "8.4.1",
63
- "@types/eslint-plugin-prettier": "^3.1.0",
64
- "@types/prettier": "2.4.4",
65
- "@types/react": "17.0.2",
66
- "@typescript-eslint/parser": "5.11.0",
67
- "eslint": "8.9.0",
68
- "eslint-config-prettier": "8.3.0",
69
- "eslint-index": "1.5.0",
70
- "prettier": "2.5.1",
71
- "react": "17.0.2"
72
+ "@types/eslint": "8.21.1",
73
+ "@types/eslint-plugin-prettier": "3.1.0",
74
+ "@types/parse-gitignore": "1.0.0",
75
+ "@types/prettier": "2.7.2",
76
+ "@types/react": "18.0.28",
77
+ "@typescript-eslint/parser": "5.54.0",
78
+ "eslint": "8.35.0",
79
+ "eslint-config-prettier": "8.6.0",
80
+ "eslint-find-rules": "4.1.0",
81
+ "prettier": "2.8.4",
82
+ "react": "18.2.0",
83
+ "vite": "4.1.4",
84
+ "vitest": "0.29.2"
72
85
  },
73
86
  "peerDependencies": {
74
- "eslint": "5.x || 6.x || 7.x || 8.x",
87
+ "eslint": "8.x",
75
88
  "prettier": "2.x",
76
89
  "typescript": "4.x"
77
90
  },
78
91
  "peerDependenciesMeta": {
92
+ "eslint": {
93
+ "optional": true
94
+ },
79
95
  "typescript": {
80
96
  "optional": true
81
97
  }
82
98
  },
99
+ "engines": {
100
+ "node": ">=16.0.0"
101
+ },
83
102
  "publishConfig": {
84
103
  "access": "public"
85
104
  },
86
- "gitHead": "0bf05f35388f1ddb53438a017186cf64d2ce99f2"
105
+ "gitHead": "20f944de90b5a5c30d6446ced65271ea3fd31c99"
87
106
  }
package/src/_rule.ts ADDED
@@ -0,0 +1,5 @@
1
+ import type { Linter } from 'eslint';
2
+
3
+ export function fixme(_status: Linter.RuleLevel | [Linter.RuleLevel, ...any[]] | undefined) {
4
+ return 'off' as const;
5
+ }