@robot-inventor/eslint-config 0.1.0 → 0.1.2

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 roboin
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2024 roboin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,2 +1,81 @@
1
- # eslint-config
2
- My ESLint config preset
1
+ # eslint-config
2
+
3
+ [@Robot-Inventor](https://github.com/Robot-Inventor/)'s ESLint config preset.
4
+
5
+ ## Installation
6
+
7
+ Until [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint) supports ESLint v9, you need to add the following code to your ``.npmrc`` before installing ``@robot-inventor/eslint-config``. If you didn't add it, you will get peer dependency warnings. See [this issue](https://github.com/typescript-eslint/typescript-eslint/issues/8211#issuecomment-2041466332) for more information.
8
+
9
+ ```ini
10
+ legacy-peer-deps=true
11
+ ```
12
+
13
+ Then, install the package:
14
+
15
+ ```bash
16
+ npm install --save-dev @robot-inventor/eslint-config
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ Add the following to your ``eslint.config.js`` file:
22
+
23
+ ```javascript
24
+ // ESModule
25
+ import { eslintConfig } from "@robot-inventor/eslint-config";
26
+
27
+ export default eslintConfig;
28
+ ```
29
+
30
+ ```javascript
31
+ // CommonJS
32
+ const { eslintConfig } = require("@robot-inventor/eslint-config");
33
+
34
+ module.exports = eslintConfig;
35
+ ```
36
+
37
+ If you don't need JSDoc rules, you can use the ``eslintConfigNoJSDoc`` instead.
38
+
39
+ ```javascript
40
+ // ESModule
41
+ import { eslintConfigNoJSDoc } from "@robot-inventor/eslint-config";
42
+
43
+ export default eslintConfigNoJSDoc;
44
+ ```
45
+
46
+ ```javascript
47
+ // CommonJS
48
+ const { eslintConfigNoJSDoc } = require("@robot-inventor/eslint-config");
49
+
50
+ module.exports = eslintConfigNoJSDoc;
51
+ ```
52
+
53
+ You can extend or override the config as needed.
54
+
55
+ ```javascript
56
+ // ESModule
57
+ import { eslintConfig } from "@robot-inventor/eslint-config";
58
+
59
+ export default [
60
+ ...eslintConfig,
61
+ {
62
+ rules: {
63
+ // Your rules here
64
+ }
65
+ }
66
+ ];
67
+ ```
68
+
69
+ ```javascript
70
+ // CommonJS
71
+ const { eslintConfig } = require("@robot-inventor/eslint-config");
72
+
73
+ module.exports = [
74
+ ...eslintConfig,
75
+ {
76
+ rules: {
77
+ // Your rules here
78
+ }
79
+ }
80
+ ];
81
+ ```
package/dist/cjs/index.js CHANGED
@@ -11,9 +11,7 @@ const eslint_config_prettier_1 = __importDefault(require("eslint-config-prettier
11
11
  const eslintConfigNoJSDoc = typescript_eslint_1.default.config(js_1.default.configs.all, eslint_plugin_jsdoc_1.default.configs["flat/recommended-typescript-error"], eslint_config_prettier_1.default, ...typescript_eslint_1.default.configs.recommendedTypeChecked, {
12
12
  languageOptions: {
13
13
  parserOptions: {
14
- project: true,
15
- // @ts-expect-error
16
- tsconfigRootDir: import.meta.dirname
14
+ project: true
17
15
  }
18
16
  },
19
17
  plugins: {
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "@robot-inventor/eslint-config",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "My ESLint config preset",
5
5
  "type": "commonjs",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
9
9
  "scripts": {
10
- "build": "tsc -p . && tsc -p ./tsconfig.cjs.json && tsconfig-to-dual-package"
10
+ "build": "tsc -p . && tsc -p ./tsconfig.cjs.json && tsconfig-to-dual-package",
11
+ "ci:version": "changeset version",
12
+ "ci:publish": "npm run build && changeset publish"
11
13
  },
12
14
  "repository": {
13
15
  "type": "git",
@@ -23,7 +25,8 @@
23
25
  },
24
26
  "homepage": "https://github.com/Robot-Inventor/eslint-config#readme",
25
27
  "publishConfig": {
26
- "access": "public"
28
+ "access": "public",
29
+ "provenance": true
27
30
  },
28
31
  "dependencies": {
29
32
  "@eslint/js": "^9.0.0",
@@ -34,6 +37,8 @@
34
37
  "typescript-eslint": "^7.6.0"
35
38
  },
36
39
  "devDependencies": {
40
+ "@changesets/changelog-github": "^0.5.0",
41
+ "@changesets/cli": "^2.27.1",
37
42
  "tsconfig-to-dual-package": "^1.2.0",
38
43
  "typescript": "^5.4.4"
39
44
  }
package/dist/esm/index.js CHANGED
@@ -5,9 +5,7 @@ import eslintConfigPrettier from "eslint-config-prettier";
5
5
  const eslintConfigNoJSDoc = tseslint.config(eslint.configs.all, jsdoc.configs["flat/recommended-typescript-error"], eslintConfigPrettier, ...tseslint.configs.recommendedTypeChecked, {
6
6
  languageOptions: {
7
7
  parserOptions: {
8
- project: true,
9
- // @ts-expect-error
10
- tsconfigRootDir: import.meta.dirname
8
+ project: true
11
9
  }
12
10
  },
13
11
  plugins: {
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "@robot-inventor/eslint-config",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "My ESLint config preset",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
9
9
  "scripts": {
10
- "build": "tsc -p . && tsc -p ./tsconfig.cjs.json && tsconfig-to-dual-package"
10
+ "build": "tsc -p . && tsc -p ./tsconfig.cjs.json && tsconfig-to-dual-package",
11
+ "ci:version": "changeset version",
12
+ "ci:publish": "npm run build && changeset publish"
11
13
  },
12
14
  "repository": {
13
15
  "type": "git",
@@ -23,7 +25,8 @@
23
25
  },
24
26
  "homepage": "https://github.com/Robot-Inventor/eslint-config#readme",
25
27
  "publishConfig": {
26
- "access": "public"
28
+ "access": "public",
29
+ "provenance": true
27
30
  },
28
31
  "dependencies": {
29
32
  "@eslint/js": "^9.0.0",
@@ -34,6 +37,8 @@
34
37
  "typescript-eslint": "^7.6.0"
35
38
  },
36
39
  "devDependencies": {
40
+ "@changesets/changelog-github": "^0.5.0",
41
+ "@changesets/cli": "^2.27.1",
37
42
  "tsconfig-to-dual-package": "^1.2.0",
38
43
  "typescript": "^5.4.4"
39
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robot-inventor/eslint-config",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "My ESLint config preset",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -18,7 +18,9 @@
18
18
  }
19
19
  },
20
20
  "scripts": {
21
- "build": "tsc -p . && tsc -p ./tsconfig.cjs.json && tsconfig-to-dual-package"
21
+ "build": "tsc -p . && tsc -p ./tsconfig.cjs.json && tsconfig-to-dual-package",
22
+ "ci:version": "changeset version",
23
+ "ci:publish": "npm run build && changeset publish"
22
24
  },
23
25
  "repository": {
24
26
  "type": "git",
@@ -34,7 +36,8 @@
34
36
  },
35
37
  "homepage": "https://github.com/Robot-Inventor/eslint-config#readme",
36
38
  "publishConfig": {
37
- "access": "public"
39
+ "access": "public",
40
+ "provenance": true
38
41
  },
39
42
  "dependencies": {
40
43
  "@eslint/js": "^9.0.0",
@@ -45,7 +48,9 @@
45
48
  "typescript-eslint": "^7.6.0"
46
49
  },
47
50
  "devDependencies": {
51
+ "@changesets/changelog-github": "^0.5.0",
52
+ "@changesets/cli": "^2.27.1",
48
53
  "tsconfig-to-dual-package": "^1.2.0",
49
54
  "typescript": "^5.4.4"
50
55
  }
51
- }
56
+ }