@ololoepepe/eslint-config-typescript 0.0.10 → 0.0.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ololoepepe/eslint-config-typescript",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "ESLint config for TypeScript",
5
5
  "main": "src/index.js",
6
6
  "imports": {
@@ -8,6 +8,7 @@
8
8
  },
9
9
  "type": "module",
10
10
  "scripts": {
11
+ "find-rules": "eslint-find-rules --unused ./src/index.js",
11
12
  "lint": "eslint ./src",
12
13
  "test": "mocha ./test/*"
13
14
  },
@@ -30,15 +31,16 @@
30
31
  },
31
32
  "homepage": "https://gitea.void-walkers.com/libs/eslint-config-typescript#README",
32
33
  "dependencies": {
33
- "@typescript-eslint/eslint-plugin": "^8.47.0",
34
- "@typescript-eslint/parser": "^8.47.0",
35
- "eslint": ">=8.57.0",
34
+ "@typescript-eslint/eslint-plugin": "^8.50.1",
35
+ "@typescript-eslint/parser": "^8.50.1",
36
+ "eslint": "^8.57.1",
36
37
  "eslint-import-resolver-typescript": "^4.4.4",
37
38
  "eslint-plugin-import": "^2.32.0",
38
- "eslint-plugin-perfectionist": "^4.15.1",
39
+ "eslint-plugin-perfectionist": "^5.1.0",
39
40
  "eslint-plugin-sort-keys-shorthand": "^2.3.0"
40
41
  },
41
42
  "devDependencies": {
43
+ "eslint-find-rules": "^5.0.0",
42
44
  "mocha": "^11.7.5"
43
45
  }
44
46
  }
@@ -3,6 +3,7 @@ export default {
3
3
  'import/consistent-type-specifier-style': 'off', // TODO: Reconsider if use TS/Flow
4
4
  'import/default': 'error',
5
5
  'import/dynamic-import-chunkname': ['error'],
6
+ 'import/enforce-node-protocol-usage': ['error', 'always'],
6
7
  'import/export': 'error',
7
8
  'import/exports-last': 'off',
8
9
  'import/extensions': 'off',
@@ -1,30 +1,34 @@
1
+ const SORT_OPTIONS = {
2
+ fallbackSort: {
3
+ type: 'unsorted'
4
+ },
5
+ ignoreCase: true,
6
+ locales: 'en-US',
7
+ newlinesBetween: 1,
8
+ order: 'asc',
9
+ partitionByComment: true,
10
+ partitionByNewLine: false,
11
+ specialCharacters: 'keep',
12
+ type: 'natural'
13
+ };
14
+
1
15
  export default {
2
16
  rules: {
3
- 'perfectionist/sort-intersection-types': ['error', {
4
- fallbackSort: {
5
- type: 'unsorted'
6
- },
7
- ignoreCase: true,
8
- locales: 'en-US',
9
- newlinesBetween: 1,
10
- order: 'asc',
11
- partitionByComment: true,
12
- partitionByNewLine: false,
13
- specialCharacters: 'keep',
14
- type: 'alphabetical'
15
- }],
16
- 'perfectionist/sort-union-types': ['error', {
17
- fallbackSort: {
18
- type: 'unsorted'
19
- },
20
- ignoreCase: true,
21
- locales: 'en-US',
22
- newlinesBetween: 1,
23
- order: 'asc',
24
- partitionByComment: true,
25
- partitionByNewLine: false,
26
- specialCharacters: 'keep',
27
- type: 'alphabetical'
28
- }]
17
+ 'perfectionist/sort-array-includes': ['error', SORT_OPTIONS],
18
+ 'perfectionist/sort-enums': ['error', SORT_OPTIONS],
19
+ 'perfectionist/sort-export-attributes': ['error', SORT_OPTIONS],
20
+ 'perfectionist/sort-exports': ['error', SORT_OPTIONS],
21
+ 'perfectionist/sort-heritage-clauses': ['error', SORT_OPTIONS],
22
+ 'perfectionist/sort-import-attributes': ['error', SORT_OPTIONS],
23
+ 'perfectionist/sort-imports': ['error', SORT_OPTIONS],
24
+ 'perfectionist/sort-interfaces': ['error', SORT_OPTIONS],
25
+ 'perfectionist/sort-intersection-types': ['error', SORT_OPTIONS],
26
+ 'perfectionist/sort-maps': ['error', SORT_OPTIONS],
27
+ 'perfectionist/sort-named-exports': ['error', SORT_OPTIONS],
28
+ 'perfectionist/sort-named-imports': ['error', SORT_OPTIONS],
29
+ 'perfectionist/sort-object-types': ['error', SORT_OPTIONS],
30
+ 'perfectionist/sort-objects': ['error', SORT_OPTIONS],
31
+ 'perfectionist/sort-sets': ['error', SORT_OPTIONS],
32
+ 'perfectionist/sort-union-types': ['error', SORT_OPTIONS]
29
33
  }
30
34
  };
@@ -96,6 +96,10 @@ export default {
96
96
  allowDestructuring: true,
97
97
  allowedNames: []
98
98
  }],
99
+ '@typescript-eslint/no-unnecessary-boolean-literal-compare': ['error', {
100
+ allowComparingNullableBooleansToFalse: true,
101
+ allowComparingNullableBooleansToTrue: true
102
+ }],
99
103
  '@typescript-eslint/no-unnecessary-condition': ['error', {
100
104
  allowConstantLoopConditions: 'only-allowed-literals',
101
105
  checkTypePredicates: false
@@ -145,6 +149,7 @@ export default {
145
149
  variables: true
146
150
  }],
147
151
  '@typescript-eslint/no-useless-constructor': 'error',
152
+ '@typescript-eslint/no-useless-default-assignment': 'error',
148
153
  '@typescript-eslint/no-useless-empty-export': 'error',
149
154
  '@typescript-eslint/no-wrapper-object-types': 'error'
150
155
  };
package/src/rules/no.js CHANGED
@@ -129,6 +129,7 @@ export default {
129
129
  'no-new-wrappers': 'error',
130
130
  'no-nonoctal-decimal-escape': 'error',
131
131
  'no-obj-calls': 'error',
132
+ 'no-object-constructor': 'error',
132
133
  'no-octal': 'error',
133
134
  'no-octal-escape': 'error',
134
135
  'no-param-reassign': 'off',