eslint-config-dolmios 1.3.5 → 1.3.7
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 +14 -5
- package/configs/{tsconfig/lib/index.json → lib/tsconfig.json} +14 -19
- package/configs/{prettier/index.json → prettier.json} +0 -0
- package/configs/{swc/index.json → swc.json} +1 -2
- package/configs/{tsconfig/index.json → tsconfig.json} +1 -1
- package/index.js +1 -0
- package/package.json +7 -5
- package/tsconfig.json +1 -1
- package/.prettierrc +0 -1
package/README.md
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
|
-
```
|
|
8
|
-
|
|
7
|
+
```sh
|
|
8
|
+
pnpm add eslint-config-dolmios
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
@@ -18,17 +18,27 @@ Populate `.eslintrc` with the following, and code away.
|
|
|
18
18
|
}
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
+
Alternatively, you can use `eslintConfig` in `package.json`.
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"eslintConfig": {
|
|
26
|
+
"extends": ["dolmios"]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
21
31
|
### Usage with Prettier
|
|
22
32
|
|
|
23
33
|
Prettier is configured to work nicely with this config, though is an optional inclusion. If you'd like to include the config, you can add it to `package.json`.
|
|
24
34
|
|
|
25
35
|
```json
|
|
26
|
-
"prettier": "eslint-config-dolmios/configs/prettier"
|
|
36
|
+
"prettier": "eslint-config-dolmios/configs/prettier"
|
|
27
37
|
```
|
|
28
38
|
|
|
29
39
|
#### Extending Prettier
|
|
30
40
|
|
|
31
|
-
>
|
|
41
|
+
> The above method does **not** offer a way to _extend_ the configuration to overwrite some properties from the shared configuration. If you need to do that, import the file in a `.prettierrc.js` file and export the modifications.
|
|
32
42
|
> [https://prettier.io/docs/en/](https://prettier.io/docs/en/configuration.html#sharing-configurations)
|
|
33
43
|
|
|
34
44
|
```js
|
|
@@ -44,7 +54,6 @@ This config also exports two TSConfig setups, `base` and `lib` respectively. The
|
|
|
44
54
|
|
|
45
55
|
```json
|
|
46
56
|
"extends": "eslint-config-dolmios/configs/tsconfig"
|
|
47
|
-
// "extends": "eslint-config-dolmios/configs/tsconfig/lib" (req. further config for source and dist)
|
|
48
57
|
```
|
|
49
58
|
|
|
50
59
|
## Contributing
|
|
@@ -1,31 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
3
|
"compilerOptions": {
|
|
4
|
-
"
|
|
5
|
-
"
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"importHelpers": true,
|
|
6
6
|
"declaration": true,
|
|
7
|
-
"
|
|
7
|
+
"sourceMap": true,
|
|
8
|
+
"strict": true,
|
|
9
|
+
"noImplicitReturns": true,
|
|
10
|
+
"noFallthroughCasesInSwitch": true,
|
|
11
|
+
"noUnusedLocals": true,
|
|
12
|
+
"noUnusedParameters": true,
|
|
13
|
+
"moduleResolution": "node",
|
|
8
14
|
"esModuleInterop": true,
|
|
15
|
+
"skipLibCheck": true,
|
|
9
16
|
"forceConsistentCasingInFileNames": true,
|
|
10
|
-
"
|
|
11
|
-
"incremental": true,
|
|
12
|
-
"isolatedModules": true,
|
|
17
|
+
"allowSyntheticDefaultImports": true,
|
|
13
18
|
"jsx": "react-jsx",
|
|
14
19
|
"lib": ["dom", "dom.iterable", "esnext"],
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"noEmit": true,
|
|
18
|
-
"noFallthroughCasesInSwitch": true,
|
|
19
|
-
"noImplicitAny": true,
|
|
20
|
-
"noImplicitReturns": true,
|
|
21
|
-
"noImplicitThis": true,
|
|
22
|
-
"noUnusedLocals": true,
|
|
23
|
-
"noUnusedParameters": true,
|
|
20
|
+
"target": "es2022",
|
|
21
|
+
"allowJs": true,
|
|
24
22
|
"resolveJsonModule": true,
|
|
25
|
-
"
|
|
26
|
-
"sourceMap": true,
|
|
27
|
-
"strict": true,
|
|
28
|
-
"target": "es6"
|
|
23
|
+
"isolatedModules": true
|
|
29
24
|
},
|
|
30
25
|
"display": "dolmios"
|
|
31
26
|
}
|
|
File without changes
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-dolmios",
|
|
3
3
|
"description": " A simple ESLint setup using @typescript-eslint",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.7",
|
|
5
5
|
"author": "Jackson Dolman <mail@dolmios.com>",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/dolmios/eslint-config-dolmios/issues"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@typescript-eslint/eslint-plugin": "^5.47.
|
|
11
|
-
"@typescript-eslint/parser": "^5.47.
|
|
12
|
-
"eslint": "^8.
|
|
10
|
+
"@typescript-eslint/eslint-plugin": "^5.47.1",
|
|
11
|
+
"@typescript-eslint/parser": "^5.47.1",
|
|
12
|
+
"eslint": "^8.31.0",
|
|
13
13
|
"eslint-plugin-import": "^2.26.0",
|
|
14
14
|
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
15
15
|
"prettier": "^2.8.1",
|
|
@@ -24,12 +24,14 @@
|
|
|
24
24
|
],
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"main": "index.js",
|
|
27
|
+
"prettier": "./configs/prettier.json",
|
|
27
28
|
"repository": {
|
|
28
29
|
"type": "git",
|
|
29
30
|
"url": "git+https://github.com/dolmios/eslint-config-dolmios.git"
|
|
30
31
|
},
|
|
31
32
|
"scripts": {
|
|
32
33
|
"lint": "eslint --ext .js",
|
|
33
|
-
"prettier": "prettier --write ."
|
|
34
|
+
"prettier": "prettier --write .",
|
|
35
|
+
"tidy": "pnpm lint && pnpm prettier"
|
|
34
36
|
}
|
|
35
37
|
}
|
package/tsconfig.json
CHANGED
package/.prettierrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"./configs/prettier"
|