@hyperupcall/eslint-config 1.0.0 → 1.2.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/output/index.cjs +65 -0
- package/output/index.d.ts +2 -0
- package/{eslint.config.js → output/index.mjs} +15 -15
- package/package.json +18 -6
package/output/index.cjs
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('globals');
|
|
4
|
+
var langJs = require('@eslint/js');
|
|
5
|
+
var langMarkdown = require('@eslint/markdown');
|
|
6
|
+
var langMdx = require('eslint-plugin-mdx');
|
|
7
|
+
var pluginPromise = require('eslint-plugin-promise');
|
|
8
|
+
var pluginNode = require('eslint-plugin-n');
|
|
9
|
+
var pluginSecurity = require('eslint-plugin-security');
|
|
10
|
+
var pluginComments = require('@eslint-community/eslint-plugin-eslint-comments/configs');
|
|
11
|
+
var pluginUnicorn = require('eslint-plugin-unicorn');
|
|
12
|
+
var pluginRegexp = require('eslint-plugin-regexp');
|
|
13
|
+
var pluginNoUnsanitized = require('eslint-plugin-no-unsanitized');
|
|
14
|
+
var pluginPerfectionist = require('eslint-plugin-perfectionist');
|
|
15
|
+
var configPrettier = require('eslint-config-prettier');
|
|
16
|
+
|
|
17
|
+
// TODO: import-x
|
|
18
|
+
|
|
19
|
+
// const config = {
|
|
20
|
+
// "extends": [
|
|
21
|
+
// "plugin:import/recommended",
|
|
22
|
+
// "plugin:mdx/recommended",
|
|
23
|
+
// ],
|
|
24
|
+
// "env": {
|
|
25
|
+
// "shared-node-browser": true,
|
|
26
|
+
// "es2022": true
|
|
27
|
+
// },
|
|
28
|
+
// "parserOptions": {
|
|
29
|
+
// "ecmaVersion": 2022,
|
|
30
|
+
// "sourceType": "module"
|
|
31
|
+
// },
|
|
32
|
+
// "overrides": [
|
|
33
|
+
// {
|
|
34
|
+
// "files": ["*.cjs"],
|
|
35
|
+
// "env": {
|
|
36
|
+
// "commonjs": true
|
|
37
|
+
// },
|
|
38
|
+
// "parserOptions": {
|
|
39
|
+
// "sourceType": "script"
|
|
40
|
+
// }
|
|
41
|
+
// }
|
|
42
|
+
// ]
|
|
43
|
+
// }
|
|
44
|
+
|
|
45
|
+
const config = [
|
|
46
|
+
langJs.configs.recommended,
|
|
47
|
+
...langMarkdown.configs.recommended,
|
|
48
|
+
{
|
|
49
|
+
...langMdx.flat,
|
|
50
|
+
processor: langMdx.createRemarkProcessor({
|
|
51
|
+
lintCodeBlocks: true,
|
|
52
|
+
}),
|
|
53
|
+
},
|
|
54
|
+
pluginPromise.configs['flat/recommended'],
|
|
55
|
+
pluginNode.configs["flat/recommended-script"],
|
|
56
|
+
pluginSecurity.configs.recommended,
|
|
57
|
+
pluginComments.recomended,
|
|
58
|
+
pluginUnicorn.configs['flat/recommended'],
|
|
59
|
+
pluginRegexp.configs["flat/recommended"],
|
|
60
|
+
pluginNoUnsanitized.configs.recommended,
|
|
61
|
+
pluginPerfectionist.configs['recommended-natural'],
|
|
62
|
+
configPrettier
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
module.exports = config;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import langJs from
|
|
3
|
-
import langMarkdown from
|
|
4
|
-
import langMdx from 'eslint-plugin-mdx'
|
|
5
|
-
import pluginPromise from 'eslint-plugin-promise'
|
|
6
|
-
import pluginNode from
|
|
7
|
-
import pluginSecurity from 'eslint-plugin-security'
|
|
8
|
-
import pluginComments from
|
|
1
|
+
import '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
9
|
import pluginUnicorn from 'eslint-plugin-unicorn';
|
|
10
|
-
import pluginRegexp from
|
|
11
|
-
import pluginNoUnsanitized from
|
|
12
|
-
import pluginPerfectionist from 'eslint-plugin-perfectionist'
|
|
13
|
-
import configPrettier from
|
|
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
14
|
|
|
15
15
|
// TODO: import-x
|
|
16
16
|
|
|
@@ -45,7 +45,7 @@ const config = [
|
|
|
45
45
|
...langMarkdown.configs.recommended,
|
|
46
46
|
{
|
|
47
47
|
...langMdx.flat,
|
|
48
|
-
processor:
|
|
48
|
+
processor: langMdx.createRemarkProcessor({
|
|
49
49
|
lintCodeBlocks: true,
|
|
50
50
|
}),
|
|
51
51
|
},
|
|
@@ -58,6 +58,6 @@ const config = [
|
|
|
58
58
|
pluginNoUnsanitized.configs.recommended,
|
|
59
59
|
pluginPerfectionist.configs['recommended-natural'],
|
|
60
60
|
configPrettier
|
|
61
|
-
]
|
|
61
|
+
];
|
|
62
62
|
|
|
63
|
-
export default
|
|
63
|
+
export { config as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperupcall/eslint-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Edwin's ESLint configuration.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -12,9 +12,14 @@
|
|
|
12
12
|
},
|
|
13
13
|
"author": "Edwin Kofler <edwin@kofler.dev> (https://edwinkofler.com)",
|
|
14
14
|
"license": "MPL-2.0",
|
|
15
|
-
"
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"import": "./output/index.mjs",
|
|
18
|
+
"require": "./output/index.cjs"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
16
21
|
"files": [
|
|
17
|
-
"
|
|
22
|
+
"output"
|
|
18
23
|
],
|
|
19
24
|
"peerDependencies": {
|
|
20
25
|
"@eslint-community/eslint-plugin-eslint-comments": ">=4.0.0",
|
|
@@ -38,7 +43,7 @@
|
|
|
38
43
|
"@hyperupcall/eslint-config": "^0.11.0",
|
|
39
44
|
"@hyperupcall/markdownlint-config": "^0.3.2",
|
|
40
45
|
"@hyperupcall/prettier-config": "^0.8.0",
|
|
41
|
-
"
|
|
46
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
42
47
|
"eslint": "^9.9.0",
|
|
43
48
|
"eslint-config-prettier": "^9.1.0",
|
|
44
49
|
"eslint-plugin-import": "^2.29.1",
|
|
@@ -53,13 +58,20 @@
|
|
|
53
58
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
54
59
|
"markdownlint": "^0.34.0",
|
|
55
60
|
"prettier": "^3.3.3",
|
|
56
|
-
"prettier-plugin-pkg": "^0.18.1"
|
|
61
|
+
"prettier-plugin-pkg": "^0.18.1",
|
|
62
|
+
"rollup": "^4.24.4",
|
|
63
|
+
"typescript": "^5.6.3"
|
|
57
64
|
},
|
|
58
65
|
"dependencies": {
|
|
59
66
|
"globals": "^15.9.0"
|
|
60
67
|
},
|
|
68
|
+
"markdownlint-cli2": {
|
|
69
|
+
"extends": "./node_modules/@hyperupcall/markdownlint-config/.markdownlint.json"
|
|
70
|
+
},
|
|
71
|
+
"private": false,
|
|
72
|
+
"prettier": "@hyperupcall/scripts-nodejs/config-prettier.js",
|
|
61
73
|
"scripts": {
|
|
62
|
-
"build": "
|
|
74
|
+
"build": "rm -rf ./output && rollup --config ./rollup.config.js && tsc --project ./tsconfig.json",
|
|
63
75
|
"format": "prettier --check .",
|
|
64
76
|
"lint": "eslint ."
|
|
65
77
|
}
|