@hyperupcall/eslint-config 0.11.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 CHANGED
@@ -10,7 +10,7 @@ pnpm i -D \
10
10
  eslint-plugin-import eslint-plugin-markdown eslint-plugin-promise \
11
11
  eslint-plugin-n eslint-plugin-unicorn eslint-plugin-security \
12
12
  @eslint-community/eslint-plugin-eslint-comments eslint-plugin-regexp \
13
- eslint-plugin-perfectionist eslint-plugin-no-unsanitized eslint-mdx
13
+ eslint-plugin-perfectionist eslint-plugin-no-unsanitized eslint-plugin-mdx
14
14
  ```
15
15
 
16
16
  ## Usage
@@ -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.11.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
- "./dist/eslintrc.cjs",
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": ">=8.0.0",
15
- "eslint-config-prettier": ">=8.0.0"
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.7.0",
20
- "bunchee": "^4.1.1",
21
- "eslint": "^8.18.0",
22
- "eslint-config-prettier": "^8.5.0",
23
- "eslint-plugin-import": "^2.29.0",
24
- "eslint-plugin-markdown": "^3.0.1",
25
- "markdownlint": "^0.32.1",
26
- "prettier": "^3.1.1",
27
- "prettier-plugin-pkg": "^0.18.0"
28
- },
29
- "description": "Edwin's ESLint configuration.",
30
- "author": "Edwin Kofler <edwin@kofler.dev> (https://edwinkofler.com)",
31
- "bugs": {
32
- "url": "https://github.com/fox-land/eslint-config-hyperupcall/issues"
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
- "repository": {
35
- "type": "git",
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
- "lint": "eslint .",
41
- "format": "prettier --check ."
63
+ "format": "prettier --check .",
64
+ "lint": "eslint ."
42
65
  }
43
66
  }
package/dist/eslintrc.cjs DELETED
@@ -1,47 +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
- 'plugin:regexp/recommended',
18
- 'eslint-config-prettier',
19
- 'plugin:perfectionist/recommended-natural',
20
- 'plugin:no-unsanitized/DOM',
21
- 'plugin:mdx/recommended'
22
- ],
23
- env: {
24
- 'shared-node-browser': true,
25
- es2022: true
26
- },
27
- parserOptions: {
28
- ecmaVersion: 2022,
29
- sourceType: 'module'
30
- },
31
- overrides: [
32
- {
33
- files: [
34
- '*.cjs'
35
- ],
36
- env: {
37
- commonjs: true
38
- },
39
- parserOptions: {
40
- sourceType: 'script'
41
- }
42
- }
43
- ]
44
- };
45
- var index = /*@__PURE__*/ getDefaultExportFromCjs(src);
46
-
47
- exports.default = index;
package/dist/eslintrc.mjs DELETED
@@ -1,45 +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
- 'plugin:regexp/recommended',
16
- 'eslint-config-prettier',
17
- 'plugin:perfectionist/recommended-natural',
18
- 'plugin:no-unsanitized/DOM',
19
- 'plugin:mdx/recommended'
20
- ],
21
- env: {
22
- 'shared-node-browser': true,
23
- es2022: true
24
- },
25
- parserOptions: {
26
- ecmaVersion: 2022,
27
- sourceType: 'module'
28
- },
29
- overrides: [
30
- {
31
- files: [
32
- '*.cjs'
33
- ],
34
- env: {
35
- commonjs: true
36
- },
37
- parserOptions: {
38
- sourceType: 'script'
39
- }
40
- }
41
- ]
42
- };
43
- var index = /*@__PURE__*/ getDefaultExportFromCjs(src);
44
-
45
- export { index as default };