@slashnephy/eslint-config 0.1.3 → 0.1.6

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/dist/common.js CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const common = {
4
- extends: ['eslint:recommended'],
5
- reportUnusedDisableDirectives: true,
4
+ extends: ['eslint:recommended', 'plugin:eslint-comments/recommended'],
5
+ rules: {
6
+ 'eslint-comments/no-unused-disable': 'error',
7
+ },
6
8
  };
7
9
  module.exports = common;
package/dist/index.js CHANGED
@@ -21,6 +21,10 @@ const config = {
21
21
  (0, path_1.resolve)(__dirname, 'prettier.js'),
22
22
  ],
23
23
  },
24
+ {
25
+ files: ['**/*.test.ts', '**/test/**/*.ts'],
26
+ extends: [(0, path_1.resolve)(__dirname, 'jest.js')],
27
+ },
24
28
  {
25
29
  files: ['**/*.tsx'],
26
30
  extends: [
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const javascript = {
4
- extends: ['plugin:import/recommended'],
4
+ extends: ['plugin:node/recommended', 'plugin:import/recommended'],
5
5
  plugins: ['promise', 'unused-imports'],
6
6
  env: {
7
7
  node: true,
@@ -43,6 +43,17 @@ const javascript = {
43
43
  },
44
44
  ],
45
45
  'unused-imports/no-unused-imports': 'error',
46
+ 'no-restricted-syntax': [
47
+ 'error',
48
+ {
49
+ selector: "CallExpression[callee.property.name='at']:not([arguments.0.type='Literal'],[arguments.0.type='UnaryExpression'][arguments.0.argument.type='Literal'])",
50
+ message: 'at method accepts only a literal argument',
51
+ },
52
+ ],
53
+ 'node/prefer-promises/dns': 'error',
54
+ 'node/prefer-promises/fs': 'error',
55
+ 'node/no-unsupported-features/es-syntax': 'off',
56
+ 'node/no-missing-import': 'off',
46
57
  },
47
58
  };
48
59
  module.exports = javascript;
package/dist/jest.js ADDED
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jest = {
4
+ plugins: ['jest'],
5
+ extends: [
6
+ 'plugin:jest/recommended',
7
+ 'plugin:jest/style',
8
+ 'plugin:jest-formatting/recommended',
9
+ ],
10
+ env: {
11
+ 'jest/globals': true,
12
+ },
13
+ rules: {},
14
+ };
15
+ module.exports = jest;
@@ -41,6 +41,8 @@ const typescript = {
41
41
  '@typescript-eslint/unbound-method': 'off',
42
42
  '@typescript-eslint/no-unsafe-assignment': 'off',
43
43
  '@typescript-eslint/no-unsafe-argument': 'off',
44
+ '@typescript-eslint/no-unsafe-member-access': 'off',
45
+ '@typescript-eslint/no-unsafe-call': 'off',
44
46
  '@typescript-eslint/no-unsafe-return': 'off',
45
47
  '@typescript-eslint/no-misused-promises': 'off',
46
48
  '@typescript-eslint/explicit-member-accessibility': 'error',
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@slashnephy/eslint-config",
3
- "version": "0.1.3",
3
+ "version": "0.1.6",
4
4
  "repository": {
5
5
  "url": "https://github.com/SlashNephy/.github",
6
6
  "directory": "env/eslint"
7
7
  },
8
- "author": "SlashNephy <spica@starry.blue>",
8
+ "author": "SlashNephy <spica@starry.blue> (https://spica.starry.blue/)",
9
9
  "license": "MIT",
10
10
  "main": "dist/index.js",
11
11
  "files": [
@@ -33,7 +33,11 @@
33
33
  "eslint-config-prettier": "8.5.0",
34
34
  "eslint-import-resolver-typescript": "2.7.1",
35
35
  "eslint-plugin-css-import-order": "1.1.0",
36
+ "eslint-plugin-eslint-comments": "3.2.0",
36
37
  "eslint-plugin-import": "2.26.0",
38
+ "eslint-plugin-jest": "26.5.3",
39
+ "eslint-plugin-jest-formatting": "3.1.0",
40
+ "eslint-plugin-node": "11.1.0",
37
41
  "eslint-plugin-promise": "6.0.0",
38
42
  "eslint-plugin-react": "7.30.0",
39
43
  "eslint-plugin-react-hooks": "4.5.0",
@@ -45,7 +49,7 @@
45
49
  "typescript": "^4"
46
50
  },
47
51
  "devDependencies": {
48
- "@slashnephy/prettier-config": "0.1.0",
52
+ "@slashnephy/prettier-config": "0.1.1",
49
53
  "@types/eslint": "8.4.3",
50
54
  "@types/node": "17.0.41",
51
55
  "@types/prettier": "2.6.3",