@so1ve/eslint-config 1.0.0-alpha.2 → 1.0.0-alpha.3
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/dist/index.cjs +16 -34
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +13 -32
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -9,7 +9,7 @@ var pluginSo1ve = require('@so1ve/eslint-plugin');
|
|
|
9
9
|
var pluginSortImports = require('@so1ve/eslint-plugin-sort-imports');
|
|
10
10
|
var pluginTs = require('@typescript-eslint/eslint-plugin');
|
|
11
11
|
var parserTs = require('@typescript-eslint/parser');
|
|
12
|
-
var
|
|
12
|
+
var eslintMdx = require('eslint-mdx');
|
|
13
13
|
var pluginArrayFunc = require('eslint-plugin-array-func');
|
|
14
14
|
var pluginEtc = require('eslint-plugin-etc');
|
|
15
15
|
var pluginHtmlJsSupport = require('eslint-plugin-html');
|
|
@@ -49,7 +49,7 @@ var pluginSo1ve__default = /*#__PURE__*/_interopDefaultLegacy(pluginSo1ve);
|
|
|
49
49
|
var pluginSortImports__default = /*#__PURE__*/_interopDefaultLegacy(pluginSortImports);
|
|
50
50
|
var pluginTs__default = /*#__PURE__*/_interopDefaultLegacy(pluginTs);
|
|
51
51
|
var parserTs__default = /*#__PURE__*/_interopDefaultLegacy(parserTs);
|
|
52
|
-
var
|
|
52
|
+
var eslintMdx__default = /*#__PURE__*/_interopDefaultLegacy(eslintMdx);
|
|
53
53
|
var pluginArrayFunc__default = /*#__PURE__*/_interopDefaultLegacy(pluginArrayFunc);
|
|
54
54
|
var pluginEtc__default = /*#__PURE__*/_interopDefaultLegacy(pluginEtc);
|
|
55
55
|
var pluginHtmlJsSupport__default = /*#__PURE__*/_interopDefaultLegacy(pluginHtmlJsSupport);
|
|
@@ -111,7 +111,7 @@ const GLOB_JSON = "**/*.json";
|
|
|
111
111
|
const GLOB_JSON5 = "**/*.json5";
|
|
112
112
|
const GLOB_JSONC = "**/*.jsonc";
|
|
113
113
|
const GLOB_ESLINTRC = "**/.eslintrc";
|
|
114
|
-
const GLOB_MARKDOWN = "**/*.md
|
|
114
|
+
const GLOB_MARKDOWN = "**/*.{md,mdx}";
|
|
115
115
|
const GLOB_VUE = "**/*.vue";
|
|
116
116
|
const GLOB_YAML = "**/*.y?(a)ml";
|
|
117
117
|
const GLOB_TOML = "**/*.toml";
|
|
@@ -595,7 +595,6 @@ const jsdoc = () => [
|
|
|
595
595
|
"jsdoc/multiline-blocks": "error",
|
|
596
596
|
"jsdoc/no-defaults": "error",
|
|
597
597
|
"jsdoc/no-multi-asterisks": "error",
|
|
598
|
-
"jsdoc/no-types": "error",
|
|
599
598
|
"jsdoc/require-param-name": "error",
|
|
600
599
|
"jsdoc/require-property": "error",
|
|
601
600
|
"jsdoc/require-property-description": "error",
|
|
@@ -650,37 +649,20 @@ const mdx = ({
|
|
|
650
649
|
overrides
|
|
651
650
|
} = {}) => [
|
|
652
651
|
{
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
languageOptions: {
|
|
659
|
-
parser: parserMdx__default["default"]
|
|
660
|
-
},
|
|
661
|
-
settings: {
|
|
662
|
-
"mdx/code-blocks": true
|
|
663
|
-
},
|
|
664
|
-
files: [GLOB_MARKDOWN],
|
|
665
|
-
processor: "mdx/remark",
|
|
666
|
-
rules: {
|
|
667
|
-
"mdx/remark": "warn",
|
|
668
|
-
"no-unused-expressions": "error"
|
|
669
|
-
}
|
|
652
|
+
...pluginMdx__default["default"].flat,
|
|
653
|
+
processor: pluginMdx__default["default"].createRemarkProcessor({
|
|
654
|
+
lintCodeBlocks: true,
|
|
655
|
+
languageMapper: {}
|
|
656
|
+
})
|
|
670
657
|
},
|
|
671
658
|
{
|
|
659
|
+
...pluginMdx__default["default"].flatCodeBlocks,
|
|
672
660
|
files: [
|
|
673
|
-
|
|
674
|
-
...componentExts.map((ext) => `${GLOB_MARKDOWN}
|
|
661
|
+
...pluginMdx__default["default"].flatCodeBlocks.files,
|
|
662
|
+
...componentExts.map((ext) => `${GLOB_MARKDOWN}/*.${ext}`)
|
|
675
663
|
],
|
|
676
|
-
languageOptions: {
|
|
677
|
-
parserOptions: {
|
|
678
|
-
ecmaFeatures: {
|
|
679
|
-
impliedStrict: true
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
},
|
|
683
664
|
rules: {
|
|
665
|
+
...pluginMdx__default["default"].flatCodeBlocks.rules,
|
|
684
666
|
"html/require-doctype": "off",
|
|
685
667
|
"ts/no-redeclare": "off",
|
|
686
668
|
"ts/no-unused-vars": "off",
|
|
@@ -1414,7 +1396,7 @@ function so1ve(options = {}, ...userConfigs) {
|
|
|
1414
1396
|
configs.push(
|
|
1415
1397
|
ignores(),
|
|
1416
1398
|
javascript({
|
|
1417
|
-
|
|
1399
|
+
overrides: overrides.javascript
|
|
1418
1400
|
}),
|
|
1419
1401
|
comments(),
|
|
1420
1402
|
node(),
|
|
@@ -1433,8 +1415,8 @@ function so1ve(options = {}, ...userConfigs) {
|
|
|
1433
1415
|
if (enableTypeScript) {
|
|
1434
1416
|
configs.push(
|
|
1435
1417
|
typescript({
|
|
1436
|
-
|
|
1437
|
-
|
|
1418
|
+
componentExts,
|
|
1419
|
+
overrides: overrides.typescript
|
|
1438
1420
|
})
|
|
1439
1421
|
);
|
|
1440
1422
|
if (typeof enableTypeScript !== "boolean") {
|
|
@@ -1538,7 +1520,7 @@ Object.defineProperty(exports, 'parserTs', {
|
|
|
1538
1520
|
});
|
|
1539
1521
|
Object.defineProperty(exports, 'parserMdx', {
|
|
1540
1522
|
enumerable: true,
|
|
1541
|
-
get: function () { return
|
|
1523
|
+
get: function () { return eslintMdx__default["default"]; }
|
|
1542
1524
|
});
|
|
1543
1525
|
Object.defineProperty(exports, 'pluginArrayFunc', {
|
|
1544
1526
|
enumerable: true,
|
package/dist/index.d.ts
CHANGED
|
@@ -186,13 +186,13 @@ declare const GLOB_JSON = "**/*.json";
|
|
|
186
186
|
declare const GLOB_JSON5 = "**/*.json5";
|
|
187
187
|
declare const GLOB_JSONC = "**/*.jsonc";
|
|
188
188
|
declare const GLOB_ESLINTRC = "**/.eslintrc";
|
|
189
|
-
declare const GLOB_MARKDOWN = "**/*.md
|
|
189
|
+
declare const GLOB_MARKDOWN = "**/*.{md,mdx}";
|
|
190
190
|
declare const GLOB_VUE = "**/*.vue";
|
|
191
191
|
declare const GLOB_YAML = "**/*.y?(a)ml";
|
|
192
192
|
declare const GLOB_TOML = "**/*.toml";
|
|
193
193
|
declare const GLOB_HTML = "**/*.htm?(l)";
|
|
194
194
|
declare const GLOB_PACKAGEJSON = "**/package.json";
|
|
195
|
-
declare const GLOB_MARKDOWN_CODE = "**/*.md
|
|
195
|
+
declare const GLOB_MARKDOWN_CODE = "**/*.{md,mdx}/**/*.?([cm])[jt]s?(x)";
|
|
196
196
|
declare const GLOB_TESTS: string[];
|
|
197
197
|
declare const GLOB_ALL_SRC: string[];
|
|
198
198
|
declare const GLOB_EXCLUDE: string[];
|
package/dist/index.mjs
CHANGED
|
@@ -12,7 +12,6 @@ import pluginTs from '@typescript-eslint/eslint-plugin';
|
|
|
12
12
|
export { default as pluginTs } from '@typescript-eslint/eslint-plugin';
|
|
13
13
|
import parserTs from '@typescript-eslint/parser';
|
|
14
14
|
export { default as parserTs } from '@typescript-eslint/parser';
|
|
15
|
-
import parserMdx from 'eslint-mdx';
|
|
16
15
|
export { default as parserMdx } from 'eslint-mdx';
|
|
17
16
|
import pluginArrayFunc from 'eslint-plugin-array-func';
|
|
18
17
|
export { default as pluginArrayFunc } from 'eslint-plugin-array-func';
|
|
@@ -101,7 +100,7 @@ const GLOB_JSON = "**/*.json";
|
|
|
101
100
|
const GLOB_JSON5 = "**/*.json5";
|
|
102
101
|
const GLOB_JSONC = "**/*.jsonc";
|
|
103
102
|
const GLOB_ESLINTRC = "**/.eslintrc";
|
|
104
|
-
const GLOB_MARKDOWN = "**/*.md
|
|
103
|
+
const GLOB_MARKDOWN = "**/*.{md,mdx}";
|
|
105
104
|
const GLOB_VUE = "**/*.vue";
|
|
106
105
|
const GLOB_YAML = "**/*.y?(a)ml";
|
|
107
106
|
const GLOB_TOML = "**/*.toml";
|
|
@@ -585,7 +584,6 @@ const jsdoc = () => [
|
|
|
585
584
|
"jsdoc/multiline-blocks": "error",
|
|
586
585
|
"jsdoc/no-defaults": "error",
|
|
587
586
|
"jsdoc/no-multi-asterisks": "error",
|
|
588
|
-
"jsdoc/no-types": "error",
|
|
589
587
|
"jsdoc/require-param-name": "error",
|
|
590
588
|
"jsdoc/require-property": "error",
|
|
591
589
|
"jsdoc/require-property-description": "error",
|
|
@@ -640,37 +638,20 @@ const mdx = ({
|
|
|
640
638
|
overrides
|
|
641
639
|
} = {}) => [
|
|
642
640
|
{
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
languageOptions: {
|
|
649
|
-
parser: parserMdx
|
|
650
|
-
},
|
|
651
|
-
settings: {
|
|
652
|
-
"mdx/code-blocks": true
|
|
653
|
-
},
|
|
654
|
-
files: [GLOB_MARKDOWN],
|
|
655
|
-
processor: "mdx/remark",
|
|
656
|
-
rules: {
|
|
657
|
-
"mdx/remark": "warn",
|
|
658
|
-
"no-unused-expressions": "error"
|
|
659
|
-
}
|
|
641
|
+
...pluginMdx.flat,
|
|
642
|
+
processor: pluginMdx.createRemarkProcessor({
|
|
643
|
+
lintCodeBlocks: true,
|
|
644
|
+
languageMapper: {}
|
|
645
|
+
})
|
|
660
646
|
},
|
|
661
647
|
{
|
|
648
|
+
...pluginMdx.flatCodeBlocks,
|
|
662
649
|
files: [
|
|
663
|
-
|
|
664
|
-
...componentExts.map((ext) => `${GLOB_MARKDOWN}
|
|
650
|
+
...pluginMdx.flatCodeBlocks.files,
|
|
651
|
+
...componentExts.map((ext) => `${GLOB_MARKDOWN}/*.${ext}`)
|
|
665
652
|
],
|
|
666
|
-
languageOptions: {
|
|
667
|
-
parserOptions: {
|
|
668
|
-
ecmaFeatures: {
|
|
669
|
-
impliedStrict: true
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
},
|
|
673
653
|
rules: {
|
|
654
|
+
...pluginMdx.flatCodeBlocks.rules,
|
|
674
655
|
"html/require-doctype": "off",
|
|
675
656
|
"ts/no-redeclare": "off",
|
|
676
657
|
"ts/no-unused-vars": "off",
|
|
@@ -1404,7 +1385,7 @@ function so1ve(options = {}, ...userConfigs) {
|
|
|
1404
1385
|
configs.push(
|
|
1405
1386
|
ignores(),
|
|
1406
1387
|
javascript({
|
|
1407
|
-
|
|
1388
|
+
overrides: overrides.javascript
|
|
1408
1389
|
}),
|
|
1409
1390
|
comments(),
|
|
1410
1391
|
node(),
|
|
@@ -1423,8 +1404,8 @@ function so1ve(options = {}, ...userConfigs) {
|
|
|
1423
1404
|
if (enableTypeScript) {
|
|
1424
1405
|
configs.push(
|
|
1425
1406
|
typescript({
|
|
1426
|
-
|
|
1427
|
-
|
|
1407
|
+
componentExts,
|
|
1408
|
+
overrides: overrides.typescript
|
|
1428
1409
|
})
|
|
1429
1410
|
);
|
|
1430
1411
|
if (typeof enableTypeScript !== "boolean") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@so1ve/eslint-config",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.3",
|
|
4
4
|
"author": "Ray <i@mk1.io> (https://github.com/so1ve/)",
|
|
5
5
|
"description": "Ray's eslint config.",
|
|
6
6
|
"keywords": [
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"toml-eslint-parser": "^0.6.0",
|
|
72
72
|
"vue-eslint-parser": "^9.3.1",
|
|
73
73
|
"yaml-eslint-parser": "^1.2.2",
|
|
74
|
-
"@so1ve/eslint-plugin
|
|
75
|
-
"@so1ve/eslint-plugin": "1.0.0-alpha.
|
|
74
|
+
"@so1ve/eslint-plugin": "1.0.0-alpha.3",
|
|
75
|
+
"@so1ve/eslint-plugin-sort-imports": "1.0.0-alpha.3"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"eslint": "^8.46.0"
|