@camaro/eslint-config 0.1.0
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/CHANGELOG.md +13 -0
- package/lib/common.d.ts +2 -0
- package/lib/common.js +24 -0
- package/lib/typescript.d.ts +2 -0
- package/lib/typescript.js +21 -0
- package/package.json +39 -0
- package/tsconfig.build.json +7 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.1.0](https://github.com/camarojs/camaro/compare/eslint-config-v0.0.1...eslint-config-v0.1.0) (2025-12-16)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* **eslint:** restructure exports ([#10](https://github.com/camarojs/camaro/issues/10))
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **camaro:** implement dependency injection ([#9](https://github.com/camarojs/camaro/issues/9)) ([a307ab7](https://github.com/camarojs/camaro/commit/a307ab72398c15ffdd4bfb6f3dbd9c2343f97f3d))
|
|
13
|
+
* **eslint:** restructure exports ([#10](https://github.com/camarojs/camaro/issues/10)) ([aa18575](https://github.com/camarojs/camaro/commit/aa18575da5b27121b5d4cbfae941863906960aa6))
|
package/lib/common.d.ts
ADDED
package/lib/common.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import eslintJS from "@eslint/js";
|
|
2
|
+
import stylistic from "@stylistic/eslint-plugin";
|
|
3
|
+
const styleLint = stylistic.configs.customize({
|
|
4
|
+
indent: 4,
|
|
5
|
+
jsx: false,
|
|
6
|
+
quotes: "double",
|
|
7
|
+
semi: true,
|
|
8
|
+
});
|
|
9
|
+
export const common = [
|
|
10
|
+
eslintJS.configs.recommended,
|
|
11
|
+
styleLint,
|
|
12
|
+
{
|
|
13
|
+
rules: {
|
|
14
|
+
"eqeqeq": "error",
|
|
15
|
+
"prefer-const": ["error", { destructuring: "all" }],
|
|
16
|
+
"@stylistic/array-bracket-newline": "error",
|
|
17
|
+
"@stylistic/array-element-newline": ["error", "consistent"],
|
|
18
|
+
"@stylistic/function-call-spacing": ["error", "never"],
|
|
19
|
+
"@stylistic/function-paren-newline": ["error", "multiline-arguments"],
|
|
20
|
+
"@stylistic/max-len": ["error", { code: 120 }],
|
|
21
|
+
"@stylistic/object-curly-newline": "error",
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import eslintTS from "typescript-eslint";
|
|
2
|
+
import { common } from "./common.js";
|
|
3
|
+
const eslintTsRules = [
|
|
4
|
+
...eslintTS.configs.recommendedTypeChecked,
|
|
5
|
+
...eslintTS.configs.strictTypeChecked,
|
|
6
|
+
...eslintTS.configs.stylisticTypeChecked,
|
|
7
|
+
].reduce((acc, config) => ({ ...acc, ...config.rules }), {});
|
|
8
|
+
export const ts = [
|
|
9
|
+
...common,
|
|
10
|
+
{
|
|
11
|
+
files: ["**/*.ts"],
|
|
12
|
+
languageOptions: {
|
|
13
|
+
parser: eslintTS.parser,
|
|
14
|
+
parserOptions: { projectService: true },
|
|
15
|
+
},
|
|
16
|
+
plugins: { "@typescript-eslint": eslintTS.plugin },
|
|
17
|
+
rules: {
|
|
18
|
+
...eslintTsRules,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
];
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@camaro/eslint-config",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A shareable eslint config.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./lib/common.js",
|
|
8
|
+
"./typescript": "./lib/typescript.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc -p ./tsconfig.build.json",
|
|
12
|
+
"test": "tsx ./test/index.ts",
|
|
13
|
+
"type-check": "tsc --noEmit && tsc -p test/tsconfig.json --noEmit"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [],
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@eslint/js": "^9.39.1",
|
|
18
|
+
"@stylistic/eslint-plugin": "^5.6.1"
|
|
19
|
+
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"eslint": ">=9.0.0",
|
|
22
|
+
"typescript-eslint": ">=8.0.0"
|
|
23
|
+
},
|
|
24
|
+
"peerDependenciesMeta": {
|
|
25
|
+
"typescript-eslint": {
|
|
26
|
+
"optional": true
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/camarojs/camaro.git"
|
|
32
|
+
},
|
|
33
|
+
"author": "Dunn <wg0121@outlook.com>",
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"bugs": {
|
|
36
|
+
"url": "https://github.com/camarojs/camaro/issues"
|
|
37
|
+
},
|
|
38
|
+
"homepage": "https://github.com/camarojs/camaro#readme"
|
|
39
|
+
}
|