@shufflies/eslint-config 1.0.1 → 1.0.3
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 +9 -2
- package/lib/cjs/configs.js +14 -4
- package/lib/esm/configs.js +14 -4
- package/package.json +8 -8
- package/CHANGELOG.md +0 -13
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ It's my own personal set of reusable eslint configuration.
|
|
|
8
8
|
Install the package:
|
|
9
9
|
|
|
10
10
|
```shell
|
|
11
|
-
|
|
11
|
+
npm install -D @shufflies/eslint-config
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
Reference it in an `eslint.config.mjs` or `eslint.config.ts`:
|
|
@@ -23,6 +23,13 @@ import { defineConfig } from "eslint/config";
|
|
|
23
23
|
export default defineConfig(
|
|
24
24
|
...recommended({
|
|
25
25
|
gitignorePaths: [fileURLToPath(new URL(".gitignore", import.meta.url))],
|
|
26
|
-
})
|
|
26
|
+
}),
|
|
27
|
+
|
|
28
|
+
// Other rule/config overrides
|
|
29
|
+
{
|
|
30
|
+
rules: {
|
|
31
|
+
"some/rule": "off"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
27
34
|
);
|
|
28
35
|
```
|
package/lib/cjs/configs.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.recommended = recommended;
|
|
7
7
|
const compat_1 = require("@eslint/compat");
|
|
8
8
|
const js_1 = __importDefault(require("@eslint/js"));
|
|
9
|
+
const eslint_plugin_import_1 = __importDefault(require("eslint-plugin-import"));
|
|
9
10
|
const eslint_plugin_simple_import_sort_1 = __importDefault(require("eslint-plugin-simple-import-sort"));
|
|
10
11
|
const eslint_plugin_unicorn_1 = __importDefault(require("eslint-plugin-unicorn"));
|
|
11
12
|
const typescript_eslint_1 = __importDefault(require("typescript-eslint"));
|
|
@@ -17,17 +18,26 @@ function recommended(args = {}) {
|
|
|
17
18
|
});
|
|
18
19
|
const result = [
|
|
19
20
|
{
|
|
20
|
-
|
|
21
|
+
name: ".gitignore contents",
|
|
22
|
+
ignores: gitIgnores.flat().concat("foo/"),
|
|
21
23
|
},
|
|
22
|
-
js_1.default.configs.recommended,
|
|
24
|
+
{ name: "eslint recommended", ...js_1.default.configs.recommended },
|
|
23
25
|
typescript_eslint_1.default.configs.recommended,
|
|
24
26
|
eslint_plugin_unicorn_1.default.configs.recommended,
|
|
27
|
+
// eslint-plugin-import
|
|
28
|
+
eslint_plugin_import_1.default.flatConfigs.recommended,
|
|
29
|
+
eslint_plugin_import_1.default.flatConfigs.typescript,
|
|
25
30
|
{
|
|
31
|
+
name: "override unicorn defaults",
|
|
26
32
|
rules: {
|
|
27
33
|
"unicorn/filename-case": "off",
|
|
34
|
+
// Don't force changing 'Props' to 'Properties' and
|
|
35
|
+
// 'el' to 'element' and so on.
|
|
36
|
+
"unicorn/prevent-abbreviations": "off",
|
|
28
37
|
},
|
|
29
38
|
},
|
|
30
39
|
{
|
|
40
|
+
name: "override imports defaults",
|
|
31
41
|
plugins: {
|
|
32
42
|
"simple-import-sort": eslint_plugin_simple_import_sort_1.default,
|
|
33
43
|
},
|
|
@@ -43,11 +53,11 @@ function recommended(args = {}) {
|
|
|
43
53
|
// ✅ Group + sort import lines, sort named specifiers
|
|
44
54
|
"simple-import-sort/imports": "error",
|
|
45
55
|
"simple-import-sort/exports": "error",
|
|
46
|
-
|
|
47
|
-
"no-duplicate-imports": "error",
|
|
56
|
+
"import/no-unresolved": ["error", { ignore: ["eslint/config"] }],
|
|
48
57
|
},
|
|
49
58
|
},
|
|
50
59
|
{
|
|
60
|
+
name: "override ts-eslint defaults",
|
|
51
61
|
rules: {
|
|
52
62
|
"@typescript-eslint/no-empty-object-type": "off",
|
|
53
63
|
"@typescript-eslint/no-unused-vars": [
|
package/lib/esm/configs.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { includeIgnoreFile } from "@eslint/compat";
|
|
2
2
|
import eslint from "@eslint/js";
|
|
3
|
+
import importPlugin from "eslint-plugin-import";
|
|
3
4
|
import simpleImportSort from "eslint-plugin-simple-import-sort";
|
|
4
5
|
import eslintPluginUnicorn from "eslint-plugin-unicorn";
|
|
5
6
|
import tseslint from "typescript-eslint";
|
|
@@ -11,17 +12,26 @@ export function recommended(args = {}) {
|
|
|
11
12
|
});
|
|
12
13
|
const result = [
|
|
13
14
|
{
|
|
14
|
-
|
|
15
|
+
name: ".gitignore contents",
|
|
16
|
+
ignores: gitIgnores.flat().concat("foo/"),
|
|
15
17
|
},
|
|
16
|
-
eslint.configs.recommended,
|
|
18
|
+
{ name: "eslint recommended", ...eslint.configs.recommended },
|
|
17
19
|
tseslint.configs.recommended,
|
|
18
20
|
eslintPluginUnicorn.configs.recommended,
|
|
21
|
+
// eslint-plugin-import
|
|
22
|
+
importPlugin.flatConfigs.recommended,
|
|
23
|
+
importPlugin.flatConfigs.typescript,
|
|
19
24
|
{
|
|
25
|
+
name: "override unicorn defaults",
|
|
20
26
|
rules: {
|
|
21
27
|
"unicorn/filename-case": "off",
|
|
28
|
+
// Don't force changing 'Props' to 'Properties' and
|
|
29
|
+
// 'el' to 'element' and so on.
|
|
30
|
+
"unicorn/prevent-abbreviations": "off",
|
|
22
31
|
},
|
|
23
32
|
},
|
|
24
33
|
{
|
|
34
|
+
name: "override imports defaults",
|
|
25
35
|
plugins: {
|
|
26
36
|
"simple-import-sort": simpleImportSort,
|
|
27
37
|
},
|
|
@@ -37,11 +47,11 @@ export function recommended(args = {}) {
|
|
|
37
47
|
// ✅ Group + sort import lines, sort named specifiers
|
|
38
48
|
"simple-import-sort/imports": "error",
|
|
39
49
|
"simple-import-sort/exports": "error",
|
|
40
|
-
|
|
41
|
-
"no-duplicate-imports": "error",
|
|
50
|
+
"import/no-unresolved": ["error", { ignore: ["eslint/config"] }],
|
|
42
51
|
},
|
|
43
52
|
},
|
|
44
53
|
{
|
|
54
|
+
name: "override ts-eslint defaults",
|
|
45
55
|
rules: {
|
|
46
56
|
"@typescript-eslint/no-empty-object-type": "off",
|
|
47
57
|
"@typescript-eslint/no-unused-vars": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shufflies/eslint-config",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
|
-
"CHANGELOG.md",
|
|
15
14
|
"lib"
|
|
16
15
|
],
|
|
17
16
|
"scripts": {
|
|
18
|
-
"prepare": "husky
|
|
17
|
+
"prepare": "husky",
|
|
19
18
|
"clean": "rimraf lib",
|
|
20
|
-
"
|
|
21
|
-
"build:
|
|
22
|
-
"build:
|
|
19
|
+
"test": "eslint test --config test/eslint.config.mjs --report-unused-disable-directives",
|
|
20
|
+
"build:types": "tsc --declaration --emitDeclarationOnly --outDir lib/types -p src",
|
|
21
|
+
"build:cjs": "tsc --module commonjs --outDir lib/cjs -p src",
|
|
22
|
+
"build:esm": "tsc --module nodenext --outDir lib/esm -p src",
|
|
23
23
|
"build": "zx scripts/build.mjs"
|
|
24
24
|
},
|
|
25
25
|
"keywords": [
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
],
|
|
29
29
|
"author": "Royston Shufflebotham",
|
|
30
30
|
"license": "MIT",
|
|
31
|
-
"packageManager": "
|
|
31
|
+
"packageManager": "npm@11.4.2",
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public",
|
|
34
34
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -44,7 +44,6 @@
|
|
|
44
44
|
"@commitlint/cli": "^19.8.1",
|
|
45
45
|
"@commitlint/config-conventional": "^19.8.1",
|
|
46
46
|
"@semantic-release/changelog": "^6.0.3",
|
|
47
|
-
"@semantic-release/git": "^10.0.1",
|
|
48
47
|
"@semantic-release/github": "^11.0.3",
|
|
49
48
|
"@semantic-release/npm": "^12.0.1",
|
|
50
49
|
"@types/node": "^24.0.1",
|
|
@@ -57,6 +56,7 @@
|
|
|
57
56
|
"dependencies": {
|
|
58
57
|
"@eslint/compat": "^1.3.0",
|
|
59
58
|
"@eslint/js": "^9.29.0",
|
|
59
|
+
"eslint-plugin-import": "^2.32.0",
|
|
60
60
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
61
61
|
"eslint-plugin-unicorn": "^59.0.1",
|
|
62
62
|
"typescript-eslint": "^8.34.0"
|
package/CHANGELOG.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
## [1.0.1](https://github.com/RoystonS/shufflies-eslint-config/compare/v1.0.0...v1.0.1) (2025-06-14)
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
### Bug Fixes
|
|
5
|
-
|
|
6
|
-
* build package before publishing ([f2bb21c](https://github.com/RoystonS/shufflies-eslint-config/commit/f2bb21c0803c7066066536521e57d206b5b6e52d))
|
|
7
|
-
|
|
8
|
-
# 1.0.0 (2025-06-14)
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
### Bug Fixes
|
|
12
|
-
|
|
13
|
-
* perform release ([0b81384](https://github.com/RoystonS/shufflies-eslint-config/commit/0b81384545bca1f6844a620181714b39079c5ec1))
|