@jskit-ai/config-eslint 0.1.3 → 0.1.4

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/base.js ADDED
@@ -0,0 +1,29 @@
1
+ import js from "@eslint/js";
2
+
3
+ const SOURCE_FILES = "**/*.{js,mjs,cjs,vue}";
4
+
5
+ const baseConfig = Object.freeze([
6
+ js.configs.recommended,
7
+ {
8
+ files: [SOURCE_FILES],
9
+ languageOptions: {
10
+ ecmaVersion: "latest",
11
+ sourceType: "module"
12
+ },
13
+ rules: {
14
+ "no-restricted-imports": [
15
+ "error",
16
+ {
17
+ patterns: [
18
+ {
19
+ regex: "^@jskit-ai/[^/]+$",
20
+ message: "Use explicit JSKIT subpath imports: @jskit-ai/<package>/server or /client."
21
+ }
22
+ ]
23
+ }
24
+ ]
25
+ }
26
+ }
27
+ ]);
28
+
29
+ export { baseConfig };
package/index.js ADDED
@@ -0,0 +1,4 @@
1
+ export { baseConfig } from "./base.js";
2
+ export { nodeConfig } from "./node.js";
3
+ export { webConfig } from "./web.js";
4
+ export { vueConfig } from "./vue.js";
package/node.js ADDED
@@ -0,0 +1,25 @@
1
+ import globals from "globals";
2
+
3
+ const SOURCE_FILES = "**/*.{js,mjs,cjs,vue}";
4
+
5
+ const nodeConfig = Object.freeze([
6
+ {
7
+ files: [SOURCE_FILES],
8
+ languageOptions: {
9
+ globals: {
10
+ ...globals.node
11
+ }
12
+ }
13
+ },
14
+ {
15
+ files: ["**/*.cjs"],
16
+ languageOptions: {
17
+ sourceType: "commonjs",
18
+ globals: {
19
+ ...globals.node
20
+ }
21
+ }
22
+ }
23
+ ]);
24
+
25
+ export { nodeConfig };
package/package.json CHANGED
@@ -1,6 +1,59 @@
1
1
  {
2
2
  "name": "@jskit-ai/config-eslint",
3
- "version": "0.1.3",
4
- "description": "Retired",
5
- "type": "module"
3
+ "version": "0.1.4",
4
+ "description": "Shared flat ESLint presets for JSKIT projects.",
5
+ "type": "module",
6
+ "files": [
7
+ "src",
8
+ "base.js",
9
+ "index.js",
10
+ "node.js",
11
+ "web.js",
12
+ "vue.js",
13
+ "README.md"
14
+ ],
15
+ "scripts": {
16
+ "test": "node --test"
17
+ },
18
+ "exports": {
19
+ ".": "./src/index.js",
20
+ "./base": "./base.js",
21
+ "./node": "./node.js",
22
+ "./web": "./web.js",
23
+ "./vue": "./vue.js",
24
+ "./server": "./src/server/index.js",
25
+ "./client": "./src/client/index.js"
26
+ },
27
+ "dependencies": {
28
+ "@eslint/js": "^9.39.1",
29
+ "eslint-plugin-vue": "^10.5.1",
30
+ "globals": "^16.5.0"
31
+ },
32
+ "peerDependencies": {
33
+ "eslint": "^9.39.1"
34
+ },
35
+ "engines": {
36
+ "node": "20.x"
37
+ },
38
+ "publishConfig": {
39
+ "access": "public"
40
+ },
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "git+https://github.com/mobily-enterprises/jskit-ai.git",
44
+ "directory": "tooling/config-eslint"
45
+ },
46
+ "bugs": {
47
+ "url": "https://github.com/mobily-enterprises/jskit-ai/issues"
48
+ },
49
+ "homepage": "https://github.com/mobily-enterprises/jskit-ai/tree/main/tooling/config-eslint#readme",
50
+ "keywords": [
51
+ "jskit",
52
+ "eslint",
53
+ "config",
54
+ "lint"
55
+ ],
56
+ "devDependencies": {
57
+ "eslint": "^9.39.1"
58
+ }
6
59
  }
@@ -0,0 +1 @@
1
+ export {};
package/src/index.js ADDED
@@ -0,0 +1 @@
1
+ throw new Error("Use explicit entrypoint import for @jskit-ai/config-eslint: /server or /client.");
@@ -0,0 +1 @@
1
+ export * from "../../index.js";
package/vue.js ADDED
@@ -0,0 +1,19 @@
1
+ import vue from "eslint-plugin-vue";
2
+
3
+ const VUE_RELATED_FILES = "**/*.{js,mjs,cjs,vue}";
4
+
5
+ const vueConfig = Object.freeze([
6
+ ...vue.configs["flat/recommended"],
7
+ {
8
+ files: [VUE_RELATED_FILES],
9
+ rules: {
10
+ "vue/multi-word-component-names": "off",
11
+ "vue/max-attributes-per-line": "off",
12
+ "vue/singleline-html-element-content-newline": "off",
13
+ "vue/attributes-order": "off",
14
+ "vue/one-component-per-file": "off"
15
+ }
16
+ }
17
+ ]);
18
+
19
+ export { vueConfig };
package/web.js ADDED
@@ -0,0 +1,16 @@
1
+ import globals from "globals";
2
+
3
+ const SOURCE_FILES = "**/*.{js,mjs,cjs,vue}";
4
+
5
+ const webConfig = Object.freeze([
6
+ {
7
+ files: [SOURCE_FILES],
8
+ languageOptions: {
9
+ globals: {
10
+ ...globals.browser
11
+ }
12
+ }
13
+ }
14
+ ]);
15
+
16
+ export { webConfig };