@abelspithost/eslint-config-ts 0.0.0 → 0.1.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/LICENSE +14 -14
- package/README.md +4 -3
- package/package.json +48 -44
- package/dist/index.d.ts +0 -5
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -44
- package/dist/index.js.map +0 -1
package/LICENSE
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
ISC License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Abel Spithost
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
-
copyright notice and this permission notice appear in all copies.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
10
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
11
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
12
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
13
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
14
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1
|
+
ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Abel Spithost
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
10
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
11
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
12
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
13
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
14
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
15
15
|
PERFORMANCE OF THIS SOFTWARE.
|
package/README.md
CHANGED
|
@@ -5,13 +5,14 @@ A shared ESLint flat config for TypeScript projects.
|
|
|
5
5
|
Includes:
|
|
6
6
|
|
|
7
7
|
- ESLint recommended rules
|
|
8
|
-
- [typescript-eslint](https://typescript-eslint.io/)
|
|
9
|
-
- Stylistic rules (trailing commas, semicolons, 2-space indent, etc.)
|
|
8
|
+
- [typescript-eslint](https://typescript-eslint.io/) strict type-checked and stylistic type-checked rules via `projectService`
|
|
9
|
+
- Stylistic rules (quotes, trailing commas, semicolons, 2-space indent, etc.)
|
|
10
|
+
- Consistent type imports (`import type`)
|
|
10
11
|
|
|
11
12
|
## Installation
|
|
12
13
|
|
|
13
14
|
```bash
|
|
14
|
-
npm install -D @abelspithost/eslint-config-ts
|
|
15
|
+
npm install -D @abelspithost/eslint-config-ts eslint typescript jiti
|
|
15
16
|
```
|
|
16
17
|
|
|
17
18
|
## Usage
|
package/package.json
CHANGED
|
@@ -1,44 +1,48 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@abelspithost/eslint-config-ts",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "ESLint configuration preset",
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "Abel Spithost",
|
|
7
|
-
"url": "https://github.com/aspithost"
|
|
8
|
-
},
|
|
9
|
-
"license": "ISC",
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "https://github.com/aspithost/eslint-config-ts.git"
|
|
13
|
-
},
|
|
14
|
-
"type": "module",
|
|
15
|
-
"exports": {
|
|
16
|
-
".": {
|
|
17
|
-
"types": "./dist/index.d.ts",
|
|
18
|
-
"import": "./dist/index.js"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
"files": [
|
|
22
|
-
"dist"
|
|
23
|
-
],
|
|
24
|
-
"scripts": {
|
|
25
|
-
"build": "npm run clean && tsc -p tsconfig.json",
|
|
26
|
-
"clean": "rimraf dist"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"typescript": "
|
|
43
|
-
}
|
|
44
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@abelspithost/eslint-config-ts",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "ESLint configuration preset",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Abel Spithost",
|
|
7
|
+
"url": "https://github.com/aspithost"
|
|
8
|
+
},
|
|
9
|
+
"license": "ISC",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/aspithost/eslint-config-ts.git"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "npm run clean && tsc -p tsconfig.build.json",
|
|
26
|
+
"clean": "rimraf dist",
|
|
27
|
+
"lint": "eslint .",
|
|
28
|
+
"typecheck": "tsc --noEmit"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@eslint/js": "^9.39.2",
|
|
32
|
+
"@stylistic/eslint-plugin": "^5.7.1",
|
|
33
|
+
"globals": "^17.3.0",
|
|
34
|
+
"typescript-eslint": "^8.54.0"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@abelspithost/tsconfig-node": "^0.0.3",
|
|
38
|
+
"@types/node": "^24.10.11",
|
|
39
|
+
"eslint": "^9.39.2",
|
|
40
|
+
"jiti": "^2.6.1",
|
|
41
|
+
"rimraf": "^6.1.2",
|
|
42
|
+
"typescript": "^5.9.3"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"eslint": ">=9.0.0",
|
|
46
|
+
"typescript": ">=5.0.0"
|
|
47
|
+
}
|
|
48
|
+
}
|
package/dist/index.d.ts
DELETED
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,wBAAgB,YAAY,CAAC,EAC3B,KAA4B,EAC5B,OAAwC,GACzC,GAAE;IACD,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACf,oCAqCL"}
|
package/dist/index.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'eslint/config';
|
|
2
|
-
import globals from 'globals';
|
|
3
|
-
import tseslint from 'typescript-eslint';
|
|
4
|
-
import eslint from '@eslint/js';
|
|
5
|
-
import stylistic from '@stylistic/eslint-plugin';
|
|
6
|
-
export function createConfig({ files = ['src/**/*.{js,ts}'], ignores = ['dist/**', 'node_modules/**'], } = {}) {
|
|
7
|
-
return defineConfig([
|
|
8
|
-
{
|
|
9
|
-
extends: [
|
|
10
|
-
eslint.configs.recommended,
|
|
11
|
-
tseslint.configs.recommended,
|
|
12
|
-
],
|
|
13
|
-
files,
|
|
14
|
-
ignores,
|
|
15
|
-
plugins: {
|
|
16
|
-
'@stylistic': stylistic,
|
|
17
|
-
},
|
|
18
|
-
languageOptions: {
|
|
19
|
-
globals: globals.node,
|
|
20
|
-
parserOptions: {
|
|
21
|
-
projectService: true,
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
rules: {
|
|
25
|
-
'@stylistic/comma-dangle': ['error', {
|
|
26
|
-
arrays: 'always-multiline',
|
|
27
|
-
objects: 'always-multiline',
|
|
28
|
-
imports: 'always-multiline',
|
|
29
|
-
exports: 'always-multiline',
|
|
30
|
-
functions: 'always-multiline',
|
|
31
|
-
}],
|
|
32
|
-
'@stylistic/eol-last': 'error',
|
|
33
|
-
'@stylistic/indent': ['error', 2, { 'SwitchCase': 1 }],
|
|
34
|
-
'@stylistic/no-trailing-spaces': 'error',
|
|
35
|
-
'@stylistic/semi': 'error',
|
|
36
|
-
'@typescript-eslint/no-unused-vars': ['error', {
|
|
37
|
-
varsIgnorePattern: '^_',
|
|
38
|
-
argsIgnorePattern: '^_',
|
|
39
|
-
}],
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
]);
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,MAAM,MAAM,YAAY,CAAC;AAChC,OAAO,SAAS,MAAM,0BAA0B,CAAC;AAEjD,MAAM,UAAU,YAAY,CAAC,EAC3B,KAAK,GAAG,CAAC,kBAAkB,CAAC,EAC5B,OAAO,GAAG,CAAC,SAAS,EAAE,iBAA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