@byloth/eslint-config-nuxt 2.8.3 → 3.0.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 +13 -4
- package/index.d.ts +3 -0
- package/index.mjs +34 -0
- package/package.json +20 -7
- package/index.cjs +0 -45
package/README.md
CHANGED
|
@@ -3,8 +3,17 @@
|
|
|
3
3
|
A collection of some common sense linting rules for Nuxt.js projects.
|
|
4
4
|
|
|
5
5
|
```js
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
6
|
+
// eslint.config.mjs
|
|
7
|
+
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
import { fileURLToPath } from "node:url";
|
|
10
|
+
|
|
11
|
+
import eslintNuxt from "@byloth/eslint-config-nuxt";
|
|
12
|
+
import { includeIgnoreFile } from "@eslint/compat";
|
|
13
|
+
|
|
14
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
15
|
+
const __dirname = path.dirname(__filename);
|
|
16
|
+
const gitignorePath = path.resolve(__dirname, ".gitignore");
|
|
17
|
+
|
|
18
|
+
export default [includeIgnoreFile(gitignorePath), ...eslintNuxt];
|
|
10
19
|
```
|
package/index.d.ts
ADDED
package/index.mjs
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import eslintTs from "@byloth/eslint-config-typescript";
|
|
2
|
+
import eslintVue from "@byloth/eslint-config-vue";
|
|
3
|
+
|
|
4
|
+
export default [...eslintTs, ...eslintVue, {
|
|
5
|
+
|
|
6
|
+
// Include TypeScript ESLint rules in `*.vue` files...
|
|
7
|
+
// - https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/eslint-recommended.ts
|
|
8
|
+
//
|
|
9
|
+
files: ["**/*.vue"],
|
|
10
|
+
rules: {
|
|
11
|
+
"constructor-super": "off",
|
|
12
|
+
"getter-return": "off",
|
|
13
|
+
"no-const-assign": "off",
|
|
14
|
+
"no-dupe-args": "off",
|
|
15
|
+
"no-dupe-class-members": "off",
|
|
16
|
+
"no-dupe-keys": "off",
|
|
17
|
+
"no-func-assign": "off",
|
|
18
|
+
"no-import-assign": "off",
|
|
19
|
+
"no-new-symbol": "off",
|
|
20
|
+
"no-obj-calls": "off",
|
|
21
|
+
"no-redeclare": "off",
|
|
22
|
+
"no-setter-return": "off",
|
|
23
|
+
"no-this-before-super": "off",
|
|
24
|
+
"no-undef": "off",
|
|
25
|
+
"no-unreachable": "off",
|
|
26
|
+
"no-unsafe-negation": "off"
|
|
27
|
+
}
|
|
28
|
+
}, {
|
|
29
|
+
files: ["**/app.vue", "**/error.vue", "**/layouts/**/*.vue", "**/pages/**/*.vue"],
|
|
30
|
+
rules: {
|
|
31
|
+
"vue/multi-word-component-names": "off",
|
|
32
|
+
"vue/no-multiple-template-root": "error"
|
|
33
|
+
}
|
|
34
|
+
}];
|
package/package.json
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byloth/eslint-config-nuxt",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "A collection of some common sense linting rules for Nuxt.js projects. ✔",
|
|
5
|
-
"keywords": [
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ESLint",
|
|
7
|
+
"Nuxt.js",
|
|
8
|
+
"TypeScript",
|
|
9
|
+
"Linting",
|
|
10
|
+
"Rules",
|
|
11
|
+
"Configuration"
|
|
12
|
+
],
|
|
6
13
|
"homepage": "https://github.com/Byloth/eslint-config/tree/master/packages/eslint-config-nuxt#readme",
|
|
7
14
|
"repository": {
|
|
8
15
|
"type": "git",
|
|
@@ -17,10 +24,16 @@
|
|
|
17
24
|
"url": "https://www.byloth.dev/"
|
|
18
25
|
},
|
|
19
26
|
"license": "Apache-2.0",
|
|
20
|
-
"
|
|
21
|
-
"files": [
|
|
27
|
+
"type": "module",
|
|
28
|
+
"files": [
|
|
29
|
+
"index.mjs",
|
|
30
|
+
"index.d.ts"
|
|
31
|
+
],
|
|
32
|
+
"main": "index.mjs",
|
|
33
|
+
"types": "index.d.ts",
|
|
22
34
|
"dependencies": {
|
|
23
|
-
"@byloth/eslint-config-typescript": "
|
|
24
|
-
"@byloth/eslint-config-vue": "
|
|
25
|
-
}
|
|
35
|
+
"@byloth/eslint-config-typescript": "3.0.1",
|
|
36
|
+
"@byloth/eslint-config-vue": "3.0.1"
|
|
37
|
+
},
|
|
38
|
+
"packageManager": "pnpm@9.12.1+sha512.e5a7e52a4183a02d5931057f7a0dbff9d5e9ce3161e33fa68ae392125b79282a8a8a470a51dfc8a0ed86221442eb2fb57019b0990ed24fab519bf0e1bc5ccfc4"
|
|
26
39
|
}
|
package/index.cjs
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
extends: [
|
|
3
|
-
"@byloth/eslint-config",
|
|
4
|
-
"@byloth/eslint-config-typescript",
|
|
5
|
-
"@byloth/eslint-config-vue"
|
|
6
|
-
],
|
|
7
|
-
overrides: [
|
|
8
|
-
{
|
|
9
|
-
// Include TypeScript ESLint rules in `*.vue` files...
|
|
10
|
-
// - https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/eslint-recommended.ts
|
|
11
|
-
//
|
|
12
|
-
files: ["*.vue"],
|
|
13
|
-
rules: {
|
|
14
|
-
"constructor-super": "off",
|
|
15
|
-
"getter-return": "off",
|
|
16
|
-
"no-const-assign": "off",
|
|
17
|
-
"no-dupe-args": "off",
|
|
18
|
-
"no-dupe-class-members": "off",
|
|
19
|
-
"no-dupe-keys": "off",
|
|
20
|
-
"no-func-assign": "off",
|
|
21
|
-
"no-import-assign": "off",
|
|
22
|
-
"no-new-symbol": "off",
|
|
23
|
-
"no-obj-calls": "off",
|
|
24
|
-
"no-redeclare": "off",
|
|
25
|
-
"no-setter-return": "off",
|
|
26
|
-
"no-this-before-super": "off",
|
|
27
|
-
"no-undef": "off",
|
|
28
|
-
"no-unreachable": "off",
|
|
29
|
-
"no-unsafe-negation": "off"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
files: [
|
|
34
|
-
"**/app.vue",
|
|
35
|
-
"**/error.vue",
|
|
36
|
-
"**/layouts/**/*.vue",
|
|
37
|
-
"**/pages/**/*.vue"
|
|
38
|
-
],
|
|
39
|
-
rules: {
|
|
40
|
-
"vue/multi-word-component-names": "off",
|
|
41
|
-
"vue/no-multiple-template-root": "error"
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
]
|
|
45
|
-
};
|