@magicdawn/eslint-config 1.2.0 → 1.4.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/dist/index.d.ts +4 -0
- package/dist/index.js +10 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -63,6 +63,10 @@ declare const mgCustomRules: {
|
|
|
63
63
|
readonly 'unused-imports/no-unused-imports': "warn";
|
|
64
64
|
readonly 'unused-imports/no-unused-vars': "off";
|
|
65
65
|
};
|
|
66
|
+
readonly dts: {
|
|
67
|
+
readonly 'no-var': "off";
|
|
68
|
+
readonly 'vars-on-top': "off";
|
|
69
|
+
};
|
|
66
70
|
};
|
|
67
71
|
type TsConfigCompilerOptionsKey = 'incremental' | 'composite' | 'tsBuildInfoFile' | 'disableSourceOfProjectReferenceRedirect' | 'disableSolutionSearching' | 'disableReferencedProjectLoad' | 'target' | 'jsx' | 'jsxFactory' | 'jsxFragmentFactory' | 'jsxImportSource' | 'lib' | 'moduleDetection' | 'noLib' | 'reactNamespace' | 'useDefineForClassFields' | 'emitDecoratorMetadata' | 'experimentalDecorators' | 'baseUrl' | 'rootDir' | 'rootDirs' | 'customConditions' | 'module' | 'moduleResolution' | 'moduleSuffixes' | 'noResolve' | 'paths' | 'resolveJsonModule' | 'resolvePackageJsonExports' | 'resolvePackageJsonImports' | 'typeRoots' | 'types' | 'allowArbitraryExtensions' | 'allowImportingTsExtensions' | 'allowUmdGlobalAccess' | 'allowJs' | 'checkJs' | 'maxNodeModuleJsDepth' | 'strict' | 'strictBindCallApply' | 'strictFunctionTypes' | 'strictNullChecks' | 'strictPropertyInitialization' | 'allowUnreachableCode' | 'allowUnusedLabels' | 'alwaysStrict' | 'exactOptionalPropertyTypes' | 'noFallthroughCasesInSwitch' | 'noImplicitAny' | 'noImplicitOverride' | 'noImplicitReturns' | 'noImplicitThis' | 'noPropertyAccessFromIndexSignature' | 'noUncheckedIndexedAccess' | 'noUnusedLocals' | 'noUnusedParameters' | 'useUnknownInCatchVariables' | 'declaration' | 'declarationDir' | 'declarationMap' | 'downlevelIteration' | 'emitBOM' | 'emitDeclarationOnly' | 'importHelpers' | 'importsNotUsedAsValues' | 'inlineSourceMap' | 'inlineSources' | 'isolatedDeclarations' | 'mapRoot' | 'newLine' | 'noEmit' | 'noEmitHelpers' | 'noEmitOnError' | 'outDir' | 'outFile' | 'preserveConstEnums' | 'preserveValueImports' | 'removeComments' | 'sourceMap' | 'sourceRoot' | 'stripInternal' | 'allowSyntheticDefaultImports' | 'esModuleInterop' | 'forceConsistentCasingInFileNames' | 'isolatedModules' | 'preserveSymlinks' | 'verbatimModuleSyntax' | 'skipDefaultLibCheck' | 'skipLibCheck';
|
|
68
72
|
declare const mgCustomJsonOrder: {
|
package/dist/index.js
CHANGED
|
@@ -55,6 +55,10 @@ const mgCustomRules = {
|
|
|
55
55
|
"import/no-default-export": "off",
|
|
56
56
|
"unused-imports/no-unused-imports": "warn",
|
|
57
57
|
"unused-imports/no-unused-vars": "off"
|
|
58
|
+
},
|
|
59
|
+
dts: {
|
|
60
|
+
"no-var": "off",
|
|
61
|
+
"vars-on-top": "off"
|
|
58
62
|
}
|
|
59
63
|
};
|
|
60
64
|
const mgCustomJsonOrder = { tsconfig: [{
|
|
@@ -139,8 +143,13 @@ function fromSxzz(...args) {
|
|
|
139
143
|
...mgCustomRules.tseslint,
|
|
140
144
|
...mgCustomRules.special__typeImport
|
|
141
145
|
}
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: "mg/custom-rules/dts",
|
|
149
|
+
files: ["**/*.d.ts"],
|
|
150
|
+
rules: { ...mgCustomRules.dts }
|
|
142
151
|
}
|
|
143
|
-
], ...moreConfigs ?? []).remove("sxzz/node").remove("sxzz/markdown/recommended/processor").removeRules("sxzz/prefer-string-function").override("sxzz/sort/tsconfig", (config) => {
|
|
152
|
+
], ...moreConfigs ?? []).remove("sxzz/node").remove("sxzz/de-morgan").remove("sxzz/markdown/recommended/processor").removeRules("sxzz/prefer-string-function").override("sxzz/sort/tsconfig", (config) => {
|
|
144
153
|
const val = config.rules?.["jsonc/sort-keys"];
|
|
145
154
|
if (val && Array.isArray(val) && val.length > 0) {
|
|
146
155
|
const ruleOptions = val.slice(1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magicdawn/eslint-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"packageManager": "pnpm@10.11.0+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977",
|
|
5
5
|
"description": "magicdawn's eslint-config",
|
|
6
6
|
"type": "module",
|