@agilebot/eslint-plugin 0.1.1 → 0.1.2

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 (2) hide show
  1. package/lib/index.js +52 -52
  2. package/package.json +1 -4
package/lib/index.js CHANGED
@@ -1,52 +1,52 @@
1
- const path = require('path');
2
- const { globSync } = require('fast-glob');
3
-
4
- // List all rules in rules folder
5
- const rulesPath = path.join(__dirname, 'rules');
6
- const ruleFiles = globSync('**/*.js', {
7
- cwd: rulesPath,
8
- depth: 2
9
- });
10
- const rules = {};
11
- ruleFiles.forEach(file => {
12
- const { dir, name } = path.parse(file);
13
- const ruleName = `${dir}/${name}`;
14
- rules[ruleName] = require(path.join(rulesPath, file));
15
- });
16
-
17
- module.exports.rules = rules;
18
-
19
- module.exports.configs = {
20
- recommended: {
21
- plugins: ['@agilebot'],
22
- rules: {
23
- 'react-hooks/exhaustive-deps': 'off',
24
- '@agilebot/react/better-exhaustive-deps': [
25
- 'warn',
26
- {
27
- checkMemoizedVariableIsStatic: true,
28
- staticHooks: {
29
- useIpcSender: true,
30
- useDialog: true,
31
- useSnackbar: true,
32
- useForm: true,
33
- 'use.*Store': {
34
- value: true,
35
- regexp: true
36
- }
37
- }
38
- }
39
- ],
40
- '@agilebot/react/prefer-named-property-access': 'error',
41
- '@agilebot/react/hook-use-ref': 'warn',
42
- '@agilebot/react/no-inline-styles': 'error',
43
- '@agilebot/tss/unused-classes': 'warn',
44
- '@agilebot/tss/no-color-value': 'error',
45
- '@agilebot/tss/class-naming': 'error',
46
- '@agilebot/import/enforce-icon-alias': 'error',
47
- '@agilebot/import/monorepo': 'error',
48
- '@agilebot/others/no-unnecessary-template-literals': 'error'
49
- },
50
- settings: {}
51
- }
52
- };
1
+ // @ts-check
2
+ const path = require('path');
3
+ const { globSync } = require('fast-glob');
4
+
5
+ // List all rules in rules folder
6
+ const rulesPath = path.join(__dirname, 'rules');
7
+ const ruleFiles = globSync('**/*.js', {
8
+ cwd: rulesPath
9
+ });
10
+ const rules = {};
11
+ ruleFiles.forEach(file => {
12
+ const { dir, name } = path.parse(file);
13
+ const ruleName = `${dir}/${name}`;
14
+ rules[ruleName] = require(path.join(rulesPath, file));
15
+ });
16
+
17
+ module.exports.rules = rules;
18
+
19
+ module.exports.configs = {
20
+ recommended: {
21
+ plugins: ['@agilebot'],
22
+ rules: {
23
+ 'react-hooks/exhaustive-deps': 'off',
24
+ '@agilebot/react/better-exhaustive-deps': [
25
+ 'warn',
26
+ {
27
+ checkMemoizedVariableIsStatic: true,
28
+ staticHooks: {
29
+ useIpcSender: true,
30
+ useDialog: true,
31
+ useSnackbar: true,
32
+ useForm: true,
33
+ 'use.*Store': {
34
+ value: true,
35
+ regexp: true
36
+ }
37
+ }
38
+ }
39
+ ],
40
+ '@agilebot/react/prefer-named-property-access': 'error',
41
+ '@agilebot/react/hook-use-ref': 'warn',
42
+ '@agilebot/react/no-inline-styles': 'error',
43
+ '@agilebot/tss/unused-classes': 'warn',
44
+ '@agilebot/tss/no-color-value': 'error',
45
+ '@agilebot/tss/class-naming': 'error',
46
+ '@agilebot/import/enforce-icon-alias': 'error',
47
+ '@agilebot/import/monorepo': 'error',
48
+ '@agilebot/others/no-unnecessary-template-literals': 'error'
49
+ },
50
+ settings: {}
51
+ }
52
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agilebot/eslint-plugin",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Agilebot's ESLint plugin",
5
5
  "main": "lib",
6
6
  "license": "MIT",
@@ -17,9 +17,6 @@
17
17
  "jiti": "^1.21.0",
18
18
  "sucrase": "^3.35.0"
19
19
  },
20
- "devDependencies": {
21
- "@agilebot/eslint-config": "0.1.1"
22
- },
23
20
  "files": [
24
21
  "lib"
25
22
  ],