@robinblomberg/eslint-config-robinblomberg 0.34.0 → 0.34.1
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/README.md +5 -5
- package/index.d.ts +6 -0
- package/index.d.ts.map +1 -0
- package/index.js +6 -4
- package/package.json +9 -4
package/README.md
CHANGED
|
@@ -13,9 +13,9 @@ Requires ESLint 9.x and Node's `require(esm)`/ESM support.
|
|
|
13
13
|
Create a file called **eslint.config.js** at the project root:
|
|
14
14
|
|
|
15
15
|
```js
|
|
16
|
-
import
|
|
16
|
+
import eslintConfigRobinBlomberg from '@robinblomberg/eslint-config-robinblomberg';
|
|
17
17
|
|
|
18
|
-
export default [...
|
|
18
|
+
export default [...eslintConfigRobinBlomberg];
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
If your project isn't set up for ESM (no `"type": "module"` in package.json), name the file **eslint.config.mjs** instead.
|
|
@@ -27,8 +27,8 @@ Add the following scripts to your package.json:
|
|
|
27
27
|
```json
|
|
28
28
|
{
|
|
29
29
|
"scripts": {
|
|
30
|
-
"lint
|
|
31
|
-
"lint
|
|
30
|
+
"lint": "eslint \"**/*.{js,jsx,ts,tsx}\"",
|
|
31
|
+
"lint:fix": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix"
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
```
|
|
@@ -38,7 +38,7 @@ Adjust the paths according to your project/file structure as necessary (e.g. `"e
|
|
|
38
38
|
To run a script, enter the following in your command line:
|
|
39
39
|
|
|
40
40
|
```sh
|
|
41
|
-
npm run lint
|
|
41
|
+
npm run lint
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
## Formatting on save
|
package/index.d.ts
ADDED
package/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":";AAuBA;;GAEG;AACH,sBAFU,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CA6gDxC"}
|
package/index.js
CHANGED
|
@@ -21,7 +21,9 @@ const error = 'error';
|
|
|
21
21
|
const off = 'off';
|
|
22
22
|
const warn = IS_DEVELOPMENT ? 'warn' : 'error';
|
|
23
23
|
|
|
24
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* @type {import('eslint').Linter.Config[]}
|
|
26
|
+
*/
|
|
25
27
|
const config = [
|
|
26
28
|
{
|
|
27
29
|
ignores: ['**/.*/**', '**/node_modules/**'],
|
|
@@ -76,7 +78,7 @@ const config = [
|
|
|
76
78
|
complexity: off,
|
|
77
79
|
'computed-property-spacing': [warn, 'never'],
|
|
78
80
|
'consistent-return': off,
|
|
79
|
-
'consistent-this':
|
|
81
|
+
'consistent-this': off,
|
|
80
82
|
'constructor-super': warn,
|
|
81
83
|
curly: [warn, 'all'],
|
|
82
84
|
'default-case': warn,
|
|
@@ -591,7 +593,7 @@ const config = [
|
|
|
591
593
|
'unicorn/no-static-only-class': warn,
|
|
592
594
|
// Disabled due to slow performance:
|
|
593
595
|
'unicorn/no-thenable': off,
|
|
594
|
-
'unicorn/no-this-assignment':
|
|
596
|
+
'unicorn/no-this-assignment': off,
|
|
595
597
|
'unicorn/no-typeof-undefined': [warn, { checkGlobalVariables: true }],
|
|
596
598
|
'unicorn/no-unnecessary-await': warn,
|
|
597
599
|
'unicorn/no-unreadable-array-destructuring': warn,
|
|
@@ -1020,7 +1022,7 @@ const config = [
|
|
|
1020
1022
|
// '@typescript-eslint/type-annotation-spacing': warn,
|
|
1021
1023
|
'@typescript-eslint/typedef': off,
|
|
1022
1024
|
'@typescript-eslint/unbound-method': off,
|
|
1023
|
-
'@typescript-eslint/unified-signatures':
|
|
1025
|
+
'@typescript-eslint/unified-signatures': off,
|
|
1024
1026
|
'default-case': off,
|
|
1025
1027
|
'default-param-last': off,
|
|
1026
1028
|
'dot-notation': off,
|
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robinblomberg/eslint-config-robinblomberg",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.1",
|
|
4
4
|
"author": "Robin Blomberg",
|
|
5
5
|
"main": "index.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
6
7
|
"type": "module",
|
|
7
8
|
"files": [
|
|
8
|
-
"index.js"
|
|
9
|
+
"index.js",
|
|
10
|
+
"index.d.ts",
|
|
11
|
+
"index.d.ts.map"
|
|
9
12
|
],
|
|
10
13
|
"repository": {
|
|
11
14
|
"type": "git",
|
|
@@ -34,11 +37,12 @@
|
|
|
34
37
|
"globals": "^17.12.0"
|
|
35
38
|
},
|
|
36
39
|
"devDependencies": {
|
|
37
|
-
"@robinblomberg/eslint-config-prettier": "^0.
|
|
38
|
-
"@robinblomberg/eslint-config-robinblomberg": "^0.
|
|
40
|
+
"@robinblomberg/eslint-config-prettier": "^0.2.0",
|
|
41
|
+
"@robinblomberg/eslint-config-robinblomberg": "^0.34.0",
|
|
39
42
|
"@types/eslint-plugin-jsx-a11y": "^6.10.1",
|
|
40
43
|
"@types/node": "*",
|
|
41
44
|
"eslint": "^9.39.5",
|
|
45
|
+
"npm-check-updates": "^23.1.0",
|
|
42
46
|
"typescript": "^6.0.3"
|
|
43
47
|
},
|
|
44
48
|
"peerDependencies": {
|
|
@@ -46,6 +50,7 @@
|
|
|
46
50
|
"typescript": "^6.0.3"
|
|
47
51
|
},
|
|
48
52
|
"scripts": {
|
|
53
|
+
"build": "tsc -p tsconfig.build.json",
|
|
49
54
|
"lint": "eslint --no-error-on-unmatched-pattern **/*.{js,ts}",
|
|
50
55
|
"lint:fix": "eslint --no-error-on-unmatched-pattern **/*.{js,ts} --fix",
|
|
51
56
|
"typecheck": "tsc"
|