@hyperupcall/eslint-config 0.10.0 → 1.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/README.md +6 -4
- package/eslint.config.js +63 -0
- package/package.json +52 -29
- package/dist/eslintrc.cjs +0 -43
- package/dist/eslintrc.mjs +0 -41
package/README.md
CHANGED
|
@@ -5,10 +5,12 @@ Edwin's [ESLint](https://eslint.org) configuration.
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
pnpm i -D
|
|
9
|
-
eslint-config-prettier \
|
|
10
|
-
eslint-plugin-import eslint-plugin-markdown eslint-plugin-promise
|
|
11
|
-
|
|
8
|
+
pnpm i -D \
|
|
9
|
+
eslint eslint-config-prettier @hyperupcall/eslint-config \
|
|
10
|
+
eslint-plugin-import eslint-plugin-markdown eslint-plugin-promise \
|
|
11
|
+
eslint-plugin-n eslint-plugin-unicorn eslint-plugin-security \
|
|
12
|
+
@eslint-community/eslint-plugin-eslint-comments eslint-plugin-regexp \
|
|
13
|
+
eslint-plugin-perfectionist eslint-plugin-no-unsanitized eslint-plugin-mdx
|
|
12
14
|
```
|
|
13
15
|
|
|
14
16
|
## Usage
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import globals from 'globals'
|
|
2
|
+
import langJs from "@eslint/js";
|
|
3
|
+
import langMarkdown from "@eslint/markdown";
|
|
4
|
+
import langMdx from 'eslint-plugin-mdx'
|
|
5
|
+
import pluginPromise from 'eslint-plugin-promise'
|
|
6
|
+
import pluginNode from "eslint-plugin-n"
|
|
7
|
+
import pluginSecurity from 'eslint-plugin-security'
|
|
8
|
+
import pluginComments from "@eslint-community/eslint-plugin-eslint-comments/configs"
|
|
9
|
+
import pluginUnicorn from 'eslint-plugin-unicorn';
|
|
10
|
+
import pluginRegexp from "eslint-plugin-regexp"
|
|
11
|
+
import pluginNoUnsanitized from "eslint-plugin-no-unsanitized";
|
|
12
|
+
import pluginPerfectionist from 'eslint-plugin-perfectionist'
|
|
13
|
+
import configPrettier from "eslint-config-prettier";
|
|
14
|
+
|
|
15
|
+
// TODO: import-x
|
|
16
|
+
|
|
17
|
+
// const config = {
|
|
18
|
+
// "extends": [
|
|
19
|
+
// "plugin:import/recommended",
|
|
20
|
+
// "plugin:mdx/recommended",
|
|
21
|
+
// ],
|
|
22
|
+
// "env": {
|
|
23
|
+
// "shared-node-browser": true,
|
|
24
|
+
// "es2022": true
|
|
25
|
+
// },
|
|
26
|
+
// "parserOptions": {
|
|
27
|
+
// "ecmaVersion": 2022,
|
|
28
|
+
// "sourceType": "module"
|
|
29
|
+
// },
|
|
30
|
+
// "overrides": [
|
|
31
|
+
// {
|
|
32
|
+
// "files": ["*.cjs"],
|
|
33
|
+
// "env": {
|
|
34
|
+
// "commonjs": true
|
|
35
|
+
// },
|
|
36
|
+
// "parserOptions": {
|
|
37
|
+
// "sourceType": "script"
|
|
38
|
+
// }
|
|
39
|
+
// }
|
|
40
|
+
// ]
|
|
41
|
+
// }
|
|
42
|
+
|
|
43
|
+
const config = [
|
|
44
|
+
langJs.configs.recommended,
|
|
45
|
+
...langMarkdown.configs.recommended,
|
|
46
|
+
{
|
|
47
|
+
...langMdx.flat,
|
|
48
|
+
processor: mdx.createRemarkProcessor({
|
|
49
|
+
lintCodeBlocks: true,
|
|
50
|
+
}),
|
|
51
|
+
},
|
|
52
|
+
pluginPromise.configs['flat/recommended'],
|
|
53
|
+
pluginNode.configs["flat/recommended-script"],
|
|
54
|
+
pluginSecurity.configs.recommended,
|
|
55
|
+
pluginComments.recomended,
|
|
56
|
+
pluginUnicorn.configs['flat/recommended'],
|
|
57
|
+
pluginRegexp.configs["flat/recommended"],
|
|
58
|
+
pluginNoUnsanitized.configs.recommended,
|
|
59
|
+
pluginPerfectionist.configs['recommended-natural'],
|
|
60
|
+
configPrettier
|
|
61
|
+
]
|
|
62
|
+
|
|
63
|
+
export default config
|
package/package.json
CHANGED
|
@@ -1,43 +1,66 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperupcall/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Edwin's ESLint configuration.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/fox-land/eslint-config-hyperupcall.git"
|
|
9
|
+
},
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/fox-land/eslint-config-hyperupcall/issues"
|
|
12
|
+
},
|
|
13
|
+
"author": "Edwin Kofler <edwin@kofler.dev> (https://edwinkofler.com)",
|
|
14
|
+
"license": "MPL-2.0",
|
|
15
|
+
"main": "./eslint.config.js",
|
|
4
16
|
"files": [
|
|
5
|
-
"./
|
|
6
|
-
"./dist/eslintrc.mjs"
|
|
17
|
+
"./eslint.config.js"
|
|
7
18
|
],
|
|
8
|
-
"license": "MPL-2.0",
|
|
9
|
-
"exports": {
|
|
10
|
-
"import": "./dist/eslintrc.mjs",
|
|
11
|
-
"require": "./dist/eslintrc.cjs"
|
|
12
|
-
},
|
|
13
19
|
"peerDependencies": {
|
|
14
|
-
"eslint": ">=
|
|
15
|
-
"eslint
|
|
20
|
+
"@eslint-community/eslint-plugin-eslint-comments": ">=4.0.0",
|
|
21
|
+
"@eslint/js": "^9.0.0",
|
|
22
|
+
"eslint": "^9.0.0",
|
|
23
|
+
"eslint-config-prettier": ">=9.1.0",
|
|
24
|
+
"eslint-plugin-import": ">=2.29.0",
|
|
25
|
+
"eslint-plugin-markdown": ">=5.0.0",
|
|
26
|
+
"eslint-plugin-mdx": ">=3.0.0",
|
|
27
|
+
"eslint-plugin-n": ">=17.0.0",
|
|
28
|
+
"eslint-plugin-no-unsanitized": ">=4.0.0",
|
|
29
|
+
"eslint-plugin-perfectionist": ">=3.0.0",
|
|
30
|
+
"eslint-plugin-promise": ">=7.0.0",
|
|
31
|
+
"eslint-plugin-regexp": ">=2.0.0",
|
|
32
|
+
"eslint-plugin-security": ">=3.0.0",
|
|
33
|
+
"eslint-plugin-unicorn": ">=55.0.0"
|
|
16
34
|
},
|
|
17
35
|
"devDependencies": {
|
|
36
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
|
|
37
|
+
"@eslint/js": "^9.9.0",
|
|
38
|
+
"@hyperupcall/eslint-config": "^0.11.0",
|
|
18
39
|
"@hyperupcall/markdownlint-config": "^0.3.2",
|
|
19
|
-
"@hyperupcall/prettier-config": "^0.
|
|
20
|
-
"bunchee": "^
|
|
21
|
-
"eslint": "^
|
|
22
|
-
"eslint-config-prettier": "^
|
|
23
|
-
"eslint-plugin-import": "^2.29.
|
|
24
|
-
"eslint-plugin-markdown": "^
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
40
|
+
"@hyperupcall/prettier-config": "^0.8.0",
|
|
41
|
+
"bunchee": "^5.3.2",
|
|
42
|
+
"eslint": "^9.9.0",
|
|
43
|
+
"eslint-config-prettier": "^9.1.0",
|
|
44
|
+
"eslint-plugin-import": "^2.29.1",
|
|
45
|
+
"eslint-plugin-markdown": "^5.1.0",
|
|
46
|
+
"eslint-plugin-mdx": "^3.1.5",
|
|
47
|
+
"eslint-plugin-n": "^17.10.2",
|
|
48
|
+
"eslint-plugin-no-unsanitized": "^4.0.2",
|
|
49
|
+
"eslint-plugin-perfectionist": "^3.2.0",
|
|
50
|
+
"eslint-plugin-promise": "^7.1.0",
|
|
51
|
+
"eslint-plugin-regexp": "^2.6.0",
|
|
52
|
+
"eslint-plugin-security": "^3.0.1",
|
|
53
|
+
"eslint-plugin-unicorn": "^55.0.0",
|
|
54
|
+
"markdownlint": "^0.34.0",
|
|
55
|
+
"prettier": "^3.3.3",
|
|
56
|
+
"prettier-plugin-pkg": "^0.18.1"
|
|
33
57
|
},
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"url": "https://github.com/fox-land/eslint-config-hyperupcall.git"
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"globals": "^15.9.0"
|
|
37
60
|
},
|
|
38
61
|
"scripts": {
|
|
39
62
|
"build": "bunchee",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
63
|
+
"format": "prettier --check .",
|
|
64
|
+
"lint": "eslint ."
|
|
42
65
|
}
|
|
43
66
|
}
|
package/dist/eslintrc.cjs
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
|
|
3
|
-
function getDefaultExportFromCjs (x) {
|
|
4
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
var src = {
|
|
8
|
-
extends: [
|
|
9
|
-
'eslint:recommended',
|
|
10
|
-
'plugin:import/recommended',
|
|
11
|
-
'plugin:markdown/recommended',
|
|
12
|
-
'plugin:promise/recommended',
|
|
13
|
-
'plugin:n/recommended',
|
|
14
|
-
'plugin:unicorn/recommended',
|
|
15
|
-
// 'plugin:security/recommended-legacy',
|
|
16
|
-
"plugin:@eslint-community/eslint-comments/recommended",
|
|
17
|
-
'eslint-config-prettier'
|
|
18
|
-
],
|
|
19
|
-
env: {
|
|
20
|
-
'shared-node-browser': true,
|
|
21
|
-
es2022: true
|
|
22
|
-
},
|
|
23
|
-
parserOptions: {
|
|
24
|
-
ecmaVersion: 2022,
|
|
25
|
-
sourceType: 'module'
|
|
26
|
-
},
|
|
27
|
-
overrides: [
|
|
28
|
-
{
|
|
29
|
-
files: [
|
|
30
|
-
'*.cjs'
|
|
31
|
-
],
|
|
32
|
-
env: {
|
|
33
|
-
commonjs: true
|
|
34
|
-
},
|
|
35
|
-
parserOptions: {
|
|
36
|
-
sourceType: 'script'
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
};
|
|
41
|
-
var index = /*@__PURE__*/ getDefaultExportFromCjs(src);
|
|
42
|
-
|
|
43
|
-
exports.default = index;
|
package/dist/eslintrc.mjs
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
function getDefaultExportFromCjs (x) {
|
|
2
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
var src = {
|
|
6
|
-
extends: [
|
|
7
|
-
'eslint:recommended',
|
|
8
|
-
'plugin:import/recommended',
|
|
9
|
-
'plugin:markdown/recommended',
|
|
10
|
-
'plugin:promise/recommended',
|
|
11
|
-
'plugin:n/recommended',
|
|
12
|
-
'plugin:unicorn/recommended',
|
|
13
|
-
// 'plugin:security/recommended-legacy',
|
|
14
|
-
"plugin:@eslint-community/eslint-comments/recommended",
|
|
15
|
-
'eslint-config-prettier'
|
|
16
|
-
],
|
|
17
|
-
env: {
|
|
18
|
-
'shared-node-browser': true,
|
|
19
|
-
es2022: true
|
|
20
|
-
},
|
|
21
|
-
parserOptions: {
|
|
22
|
-
ecmaVersion: 2022,
|
|
23
|
-
sourceType: 'module'
|
|
24
|
-
},
|
|
25
|
-
overrides: [
|
|
26
|
-
{
|
|
27
|
-
files: [
|
|
28
|
-
'*.cjs'
|
|
29
|
-
],
|
|
30
|
-
env: {
|
|
31
|
-
commonjs: true
|
|
32
|
-
},
|
|
33
|
-
parserOptions: {
|
|
34
|
-
sourceType: 'script'
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
};
|
|
39
|
-
var index = /*@__PURE__*/ getDefaultExportFromCjs(src);
|
|
40
|
-
|
|
41
|
-
export { index as default };
|