@remcohaszing/eslint 11.0.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/LICENSE.md +18 -0
- package/README.md +134 -0
- package/lib/allowedProperties.js +33 -0
- package/lib/config.js +1129 -0
- package/lib/constants.js +17 -0
- package/lib/getIgnorePatterns.js +27 -0
- package/package.json +59 -0
- package/types/allowedProperties.d.ts +5 -0
- package/types/allowedProperties.d.ts.map +1 -0
- package/types/config.d.ts +5 -0
- package/types/config.d.ts.map +1 -0
- package/types/constants.d.ts +9 -0
- package/types/constants.d.ts.map +1 -0
- package/types/getIgnorePatterns.d.ts +9 -0
- package/types/getIgnorePatterns.d.ts.map +1 -0
package/lib/constants.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Known packages in on DefinitelyTyped that don’t describe an npm package.
|
|
3
|
+
*/
|
|
4
|
+
export const dtOnlyPackages = [
|
|
5
|
+
'estree',
|
|
6
|
+
'estree-jsx',
|
|
7
|
+
'hast',
|
|
8
|
+
'mdast',
|
|
9
|
+
'unist',
|
|
10
|
+
'web-app-manifest',
|
|
11
|
+
'xast'
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Known packages that export only type definitions, but which don’t contain a JavaScript file.
|
|
16
|
+
*/
|
|
17
|
+
export const typesOnlyPackages = ['@fortawesome/fontawesome-common-types']
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import { Linter } from 'eslint'
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { dirname, join } from 'node:path'
|
|
6
|
+
|
|
7
|
+
import { includeIgnoreFile } from '@eslint/compat'
|
|
8
|
+
import findUp from 'find-up'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Determine the default ignore pattern based on `.gitignore`.
|
|
12
|
+
*
|
|
13
|
+
* @returns {Linter.Config | undefined}
|
|
14
|
+
* An array of ignore patterns accepted in an ESLint configuration.
|
|
15
|
+
*/
|
|
16
|
+
export function getIgnorePatterns() {
|
|
17
|
+
const gitDir = findUp.sync('.git', { type: 'directory' })
|
|
18
|
+
|
|
19
|
+
if (gitDir) {
|
|
20
|
+
const gitIgnorePath = join(dirname(gitDir), '.gitignore')
|
|
21
|
+
try {
|
|
22
|
+
return includeIgnoreFile(gitIgnorePath)
|
|
23
|
+
} catch {
|
|
24
|
+
// Do nothing
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@remcohaszing/eslint",
|
|
3
|
+
"version": "11.0.0",
|
|
4
|
+
"description": "A strict ESLint configuration.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"eslint",
|
|
7
|
+
"eslintconfig"
|
|
8
|
+
],
|
|
9
|
+
"homepage": "https://github.com/remcohaszing/eslint#readme",
|
|
10
|
+
"bugs": "https://github.com/remcohaszing/eslint/issues",
|
|
11
|
+
"repository": "remcohaszing/eslint",
|
|
12
|
+
"funding": "https://github.com/sponsors/remcohaszing",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"author": "Remco Haszing <remcohaszing@gmail.com>",
|
|
15
|
+
"type": "module",
|
|
16
|
+
"exports": {
|
|
17
|
+
"types": "./types/config.d.ts",
|
|
18
|
+
"default": "./lib/config.js"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"lib",
|
|
22
|
+
"types"
|
|
23
|
+
],
|
|
24
|
+
"workspaces": [
|
|
25
|
+
"examples/*"
|
|
26
|
+
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"prepack": "tsc -b",
|
|
29
|
+
"test": "node --test"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@eslint/compat": "^1.0.0",
|
|
33
|
+
"@eslint/markdown": "^6.0.0",
|
|
34
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.0.0",
|
|
35
|
+
"@stylistic/eslint-plugin": "^4.0.0",
|
|
36
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
37
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
38
|
+
"confusing-browser-globals": "^1.0.0",
|
|
39
|
+
"eslint-plugin-import-x": "^4.0.0",
|
|
40
|
+
"eslint-plugin-jest-formatting": "^3.0.0",
|
|
41
|
+
"eslint-plugin-jsdoc": "^50.0.0",
|
|
42
|
+
"eslint-plugin-n": "^17.0.0",
|
|
43
|
+
"eslint-plugin-perfectionist": "^4.0.0",
|
|
44
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
45
|
+
"eslint-plugin-unicorn": "^58.0.0",
|
|
46
|
+
"find-up": "^5.0.0"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/confusing-browser-globals": "^1.0.0",
|
|
50
|
+
"prettier-plugin-packagejson": "^2.0.0",
|
|
51
|
+
"remark-cli": "^12.0.0",
|
|
52
|
+
"remark-preset-remcohaszing": "^3.0.0",
|
|
53
|
+
"typescript": "^5.0.0"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"eslint": "9",
|
|
57
|
+
"prettier": "3"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"allowedProperties.d.ts","sourceRoot":"","sources":["../lib/allowedProperties.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,yCA6BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../lib/config.js"],"names":[],"mappings":";AA8hCA,+DA0EE;AAljCF,0DAo+BE;4BAzhCuB,QAAQ"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Known packages in on DefinitelyTyped that don’t describe an npm package.
|
|
3
|
+
*/
|
|
4
|
+
export const dtOnlyPackages: string[];
|
|
5
|
+
/**
|
|
6
|
+
* Known packages that export only type definitions, but which don’t contain a JavaScript file.
|
|
7
|
+
*/
|
|
8
|
+
export const typesOnlyPackages: string[];
|
|
9
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../lib/constants.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,sCAQC;AAED;;GAEG;AACH,yCAA0E"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Determine the default ignore pattern based on `.gitignore`.
|
|
3
|
+
*
|
|
4
|
+
* @returns {Linter.Config | undefined}
|
|
5
|
+
* An array of ignore patterns accepted in an ESLint configuration.
|
|
6
|
+
*/
|
|
7
|
+
export function getIgnorePatterns(): Linter.Config | undefined;
|
|
8
|
+
import type { Linter } from 'eslint';
|
|
9
|
+
//# sourceMappingURL=getIgnorePatterns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getIgnorePatterns.d.ts","sourceRoot":"","sources":["../lib/getIgnorePatterns.js"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,qCAHa,aAAa,GAAG,SAAS,CAcrC;4BAzB0B,QAAQ"}
|