@jabworks/eslint-plugin 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.
- package/CHANGELOG.md +7 -0
- package/README.md +74 -0
- package/package.json +60 -0
- package/src/configs/base.js +60 -0
- package/src/configs/comments.js +13 -0
- package/src/configs/next.js +86 -0
- package/src/configs/react.js +52 -0
- package/src/configs/typescript.js +30 -0
- package/src/configs/vitest.js +28 -0
- package/src/index.js +25 -0
- package/src/lib/constants.js +3 -0
- package/src/rules/best-practice.js +228 -0
- package/src/rules/comments.js +12 -0
- package/src/rules/es6.js +66 -0
- package/src/rules/import.js +116 -0
- package/src/rules/jsx-a11y.js +6 -0
- package/src/rules/possible-errors.js +35 -0
- package/src/rules/react.js +122 -0
- package/src/rules/stylistic.js +119 -0
- package/src/rules/typescript.extension.js +39 -0
- package/src/rules/typescript.import.js +19 -0
- package/src/rules/typescript.js +137 -0
- package/src/rules/unicorn.js +16 -0
- package/src/rules/variables.js +31 -0
- package/src/rules/vitest.js +10 -0
- package/src/types/index.d.ts +17 -0
- package/tsconfig.json +3 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** @type {import('eslint').Linter.RulesRecord} */
|
|
2
|
+
const rules = {
|
|
3
|
+
/**
|
|
4
|
+
* Disallow labels that share a name with a variable.
|
|
5
|
+
*
|
|
6
|
+
* 🚫 Not fixable - https://eslint.org/docs/rules/no-label-var
|
|
7
|
+
*/
|
|
8
|
+
'no-label-var': 'error',
|
|
9
|
+
/**
|
|
10
|
+
* Disallow initializing variables to `undefined`.
|
|
11
|
+
*
|
|
12
|
+
* 🔧 Fixable - https://eslint.org/docs/rules/no-undef-init
|
|
13
|
+
*/
|
|
14
|
+
'no-undef-init': 'warn',
|
|
15
|
+
/**
|
|
16
|
+
* Disallow unused variables.
|
|
17
|
+
*
|
|
18
|
+
* 🚫 Not fixable - https://eslint.org/docs/rules/no-unused-vars
|
|
19
|
+
*/ 'no-unused-vars': [
|
|
20
|
+
'error',
|
|
21
|
+
{
|
|
22
|
+
args: 'after-used',
|
|
23
|
+
argsIgnorePattern: '^_',
|
|
24
|
+
ignoreRestSiblings: false,
|
|
25
|
+
vars: 'all',
|
|
26
|
+
varsIgnorePattern: '^_',
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default rules;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** @type {import('eslint').Linter.RulesRecord} */
|
|
2
|
+
const rules = {
|
|
3
|
+
'vitest/max-nested-describe': ['error', { max: 3 }],
|
|
4
|
+
'vitest/no-commented-out-tests': 'error',
|
|
5
|
+
'vitest/no-disabled-tests': 'error',
|
|
6
|
+
'vitest/no-focused-tests': 'error',
|
|
7
|
+
'vitest/no-identical-title': 'error',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default rules;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type Linter } from 'eslint';
|
|
2
|
+
|
|
3
|
+
declare const plugin: {
|
|
4
|
+
readonly meta: {
|
|
5
|
+
readonly name: string;
|
|
6
|
+
readonly version: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
readonly configs: {
|
|
10
|
+
readonly base: Readonly<Linter.Config[]>;
|
|
11
|
+
readonly comments: Readonly<Linter.Config[]>;
|
|
12
|
+
readonly next: Readonly<Linter.Config[]>;
|
|
13
|
+
readonly react: Readonly<Linter.Config[]>;
|
|
14
|
+
readonly typescript: Readonly<Linter.Config[]>;
|
|
15
|
+
readonly vitest: Readonly<Linter.Config[]>;
|
|
16
|
+
};
|
|
17
|
+
};
|
package/tsconfig.json
ADDED