@eslinted/core 12.0.1 → 13.0.0-rc.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/config/index.d.ts +23 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/{objects → config}/index.js.map +1 -1
- package/dist/config/rule.d.ts +7 -0
- package/dist/config/rule.d.ts.map +1 -0
- package/dist/config/rule.js +2 -0
- package/dist/config/rule.js.map +1 -0
- package/dist/factory/global.d.ts +13 -10
- package/dist/factory/global.d.ts.map +1 -1
- package/dist/factory/global.js +20 -18
- package/dist/factory/global.js.map +1 -1
- package/dist/factory/index.d.ts +2 -16
- package/dist/factory/index.d.ts.map +1 -1
- package/dist/factory/index.js +2 -21
- package/dist/factory/index.js.map +1 -1
- package/dist/factory/options/index.d.ts +10 -9
- package/dist/factory/options/index.d.ts.map +1 -1
- package/dist/factory/options/index.js +8 -8
- package/dist/factory/options/index.js.map +1 -1
- package/dist/factory/options/{option/index.d.ts → option.d.ts} +27 -14
- package/dist/factory/options/{option/index.d.ts.map → option.d.ts.map} +1 -1
- package/dist/factory/options/{option/index.js → option.js} +5 -3
- package/dist/factory/options/option.js.map +1 -0
- package/dist/factory/options/proto.d.ts +19 -0
- package/dist/factory/options/proto.d.ts.map +1 -0
- package/dist/factory/options/proto.js +2 -0
- package/dist/factory/options/proto.js.map +1 -0
- package/dist/factory/options/{html.d.ts → scopes/html.d.ts} +2 -2
- package/dist/factory/options/scopes/html.d.ts.map +1 -0
- package/dist/factory/options/{html.js → scopes/html.js} +1 -1
- package/dist/factory/options/scopes/html.js.map +1 -0
- package/dist/factory/options/{js.d.ts → scopes/js.d.ts} +1 -1
- package/dist/factory/options/scopes/js.d.ts.map +1 -0
- package/dist/factory/options/{js.js → scopes/js.js} +1 -1
- package/dist/factory/options/scopes/js.js.map +1 -0
- package/dist/factory/options/{json.d.ts → scopes/json.d.ts} +2 -2
- package/dist/factory/options/scopes/json.d.ts.map +1 -0
- package/dist/factory/options/{json.js → scopes/json.js} +1 -1
- package/dist/factory/options/scopes/json.js.map +1 -0
- package/dist/factory/options/{jsonc.d.ts → scopes/jsonc.d.ts} +2 -2
- package/dist/factory/options/scopes/jsonc.d.ts.map +1 -0
- package/dist/factory/options/{jsonc.js → scopes/jsonc.js} +1 -1
- package/dist/factory/options/scopes/jsonc.js.map +1 -0
- package/dist/factory/options/{mocha.d.ts → scopes/mocha.d.ts} +1 -1
- package/dist/factory/options/scopes/mocha.d.ts.map +1 -0
- package/dist/factory/options/{mocha.js → scopes/mocha.js} +1 -1
- package/dist/factory/options/scopes/mocha.js.map +1 -0
- package/dist/factory/options/{svelte.d.ts → scopes/svelte.d.ts} +2 -2
- package/dist/factory/options/scopes/svelte.d.ts.map +1 -0
- package/dist/factory/options/{svelte.js → scopes/svelte.js} +1 -1
- package/dist/factory/options/scopes/svelte.js.map +1 -0
- package/dist/factory/options/{ts.d.ts → scopes/ts.d.ts} +1 -1
- package/dist/factory/options/scopes/ts.d.ts.map +1 -0
- package/dist/factory/options/{ts.js → scopes/ts.js} +1 -1
- package/dist/factory/options/scopes/ts.js.map +1 -0
- package/dist/factory/options/{yml.d.ts → scopes/yml.d.ts} +1 -1
- package/dist/factory/options/scopes/yml.d.ts.map +1 -0
- package/dist/factory/options/{yml.js → scopes/yml.js} +1 -1
- package/dist/factory/options/scopes/yml.js.map +1 -0
- package/dist/factory/ruleset.d.ts +10 -0
- package/dist/factory/ruleset.d.ts.map +1 -0
- package/dist/factory/ruleset.js +18 -0
- package/dist/factory/ruleset.js.map +1 -0
- package/dist/factory/scoped.d.ts +13 -0
- package/dist/factory/scoped.d.ts.map +1 -0
- package/dist/factory/scoped.js +17 -0
- package/dist/factory/scoped.js.map +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/interface/imports/index.d.ts +3 -0
- package/dist/interface/imports/index.d.ts.map +1 -0
- package/dist/{objects/config → interface/imports}/index.js.map +1 -1
- package/dist/interface/index.d.ts +3 -3
- package/dist/interface/index.d.ts.map +1 -1
- package/dist/interface/input.d.ts +18 -0
- package/dist/interface/input.d.ts.map +1 -0
- package/dist/interface/input.js +2 -0
- package/dist/interface/input.js.map +1 -0
- package/dist/interface/output.d.ts +17 -0
- package/dist/interface/output.d.ts.map +1 -0
- package/dist/interface/output.js +2 -0
- package/dist/interface/output.js.map +1 -0
- package/dist/{scopes/index.d.ts → scopes.d.ts} +2 -2
- package/dist/scopes.d.ts.map +1 -0
- package/dist/{scopes/index.js → scopes.js} +1 -1
- package/dist/scopes.js.map +1 -0
- package/dist/scopes.spec.d.ts +2 -0
- package/dist/scopes.spec.d.ts.map +1 -0
- package/dist/{scopes/index.spec.js → scopes.spec.js} +2 -2
- package/dist/scopes.spec.js.map +1 -0
- package/package.json +1 -1
- package/src/config/index.ts +42 -0
- package/src/config/rule.ts +14 -0
- package/src/factory/global.ts +20 -18
- package/src/factory/index.ts +2 -35
- package/src/factory/options/index.ts +10 -13
- package/src/factory/options/{option/index.ts → option.ts} +35 -31
- package/src/factory/options/proto.ts +46 -0
- package/src/factory/options/{html.ts → scopes/html.ts} +2 -3
- package/src/factory/options/{js.ts → scopes/js.ts} +1 -1
- package/src/factory/options/{json.ts → scopes/json.ts} +2 -3
- package/src/factory/options/{jsonc.ts → scopes/jsonc.ts} +2 -3
- package/src/factory/options/{mocha.ts → scopes/mocha.ts} +1 -1
- package/src/factory/options/{svelte.ts → scopes/svelte.ts} +2 -2
- package/src/factory/options/{ts.ts → scopes/ts.ts} +1 -1
- package/src/factory/options/{yml.ts → scopes/yml.ts} +1 -1
- package/src/factory/ruleset.ts +27 -0
- package/src/factory/scoped.ts +17 -0
- package/src/index.ts +19 -35
- package/src/interface/imports/index.ts +16 -0
- package/src/interface/index.ts +3 -11
- package/src/interface/input.ts +26 -0
- package/src/interface/output.ts +24 -0
- package/src/{scopes/index.spec.ts → scopes.spec.ts} +1 -1
- package/src/{scopes/index.ts → scopes.ts} +1 -1
- package/dist/factory/files.d.ts +0 -7
- package/dist/factory/files.d.ts.map +0 -1
- package/dist/factory/files.js +0 -17
- package/dist/factory/files.js.map +0 -1
- package/dist/factory/ignores.d.ts +0 -7
- package/dist/factory/ignores.d.ts.map +0 -1
- package/dist/factory/ignores.js +0 -17
- package/dist/factory/ignores.js.map +0 -1
- package/dist/factory/options/html.d.ts.map +0 -1
- package/dist/factory/options/html.js.map +0 -1
- package/dist/factory/options/js.d.ts.map +0 -1
- package/dist/factory/options/js.js.map +0 -1
- package/dist/factory/options/json.d.ts.map +0 -1
- package/dist/factory/options/json.js.map +0 -1
- package/dist/factory/options/jsonc.d.ts.map +0 -1
- package/dist/factory/options/jsonc.js.map +0 -1
- package/dist/factory/options/mocha.d.ts.map +0 -1
- package/dist/factory/options/mocha.js.map +0 -1
- package/dist/factory/options/option/index.js.map +0 -1
- package/dist/factory/options/option/template/globals.d.ts +0 -3
- package/dist/factory/options/option/template/globals.d.ts.map +0 -1
- package/dist/factory/options/option/template/globals.js +0 -2
- package/dist/factory/options/option/template/globals.js.map +0 -1
- package/dist/factory/options/option/template/index.d.ts +0 -11
- package/dist/factory/options/option/template/index.d.ts.map +0 -1
- package/dist/factory/options/option/template/index.js.map +0 -1
- package/dist/factory/options/option/template/languageOptions.d.ts +0 -9
- package/dist/factory/options/option/template/languageOptions.d.ts.map +0 -1
- package/dist/factory/options/option/template/languageOptions.js +0 -2
- package/dist/factory/options/option/template/languageOptions.js.map +0 -1
- package/dist/factory/options/svelte.d.ts.map +0 -1
- package/dist/factory/options/svelte.js.map +0 -1
- package/dist/factory/options/ts.d.ts.map +0 -1
- package/dist/factory/options/ts.js.map +0 -1
- package/dist/factory/options/yml.d.ts.map +0 -1
- package/dist/factory/options/yml.js.map +0 -1
- package/dist/factory/rules/index.d.ts +0 -9
- package/dist/factory/rules/index.d.ts.map +0 -1
- package/dist/factory/rules/index.js +0 -15
- package/dist/factory/rules/index.js.map +0 -1
- package/dist/factory/rules/ruleset.d.ts +0 -10
- package/dist/factory/rules/ruleset.d.ts.map +0 -1
- package/dist/factory/rules/ruleset.js +0 -20
- package/dist/factory/rules/ruleset.js.map +0 -1
- package/dist/interface/input/global/ignores/defaults.d.ts +0 -3
- package/dist/interface/input/global/ignores/defaults.d.ts.map +0 -1
- package/dist/interface/input/global/ignores/defaults.js +0 -2
- package/dist/interface/input/global/ignores/defaults.js.map +0 -1
- package/dist/interface/input/global/ignores/extend.d.ts +0 -5
- package/dist/interface/input/global/ignores/extend.d.ts.map +0 -1
- package/dist/interface/input/global/ignores/extend.js +0 -2
- package/dist/interface/input/global/ignores/extend.js.map +0 -1
- package/dist/interface/input/global/ignores/index.d.ts +0 -8
- package/dist/interface/input/global/ignores/index.d.ts.map +0 -1
- package/dist/interface/input/global/ignores/index.js.map +0 -1
- package/dist/interface/input/global/index.d.ts +0 -6
- package/dist/interface/input/global/index.d.ts.map +0 -1
- package/dist/interface/input/global/index.js +0 -2
- package/dist/interface/input/global/index.js.map +0 -1
- package/dist/interface/input/imports/index.d.ts +0 -8
- package/dist/interface/input/imports/index.d.ts.map +0 -1
- package/dist/interface/input/imports/index.js +0 -2
- package/dist/interface/input/imports/index.js.map +0 -1
- package/dist/interface/input/imports/parsers/index.d.ts +0 -4
- package/dist/interface/input/imports/parsers/index.d.ts.map +0 -1
- package/dist/interface/input/imports/parsers/index.js +0 -2
- package/dist/interface/input/imports/parsers/index.js.map +0 -1
- package/dist/interface/input/imports/parsers/parser.d.ts +0 -3
- package/dist/interface/input/imports/parsers/parser.d.ts.map +0 -1
- package/dist/interface/input/imports/parsers/parser.js +0 -2
- package/dist/interface/input/imports/parsers/parser.js.map +0 -1
- package/dist/interface/input/imports/plugins.d.ts +0 -3
- package/dist/interface/input/imports/plugins.d.ts.map +0 -1
- package/dist/interface/input/imports/plugins.js +0 -2
- package/dist/interface/input/imports/plugins.js.map +0 -1
- package/dist/interface/input/index.d.ts +0 -7
- package/dist/interface/input/index.d.ts.map +0 -1
- package/dist/interface/input/index.js +0 -2
- package/dist/interface/input/index.js.map +0 -1
- package/dist/interface/input/scoped/files/defaults.d.ts +0 -3
- package/dist/interface/input/scoped/files/defaults.d.ts.map +0 -1
- package/dist/interface/input/scoped/files/defaults.js +0 -2
- package/dist/interface/input/scoped/files/defaults.js.map +0 -1
- package/dist/interface/input/scoped/files/includes.d.ts +0 -3
- package/dist/interface/input/scoped/files/includes.d.ts.map +0 -1
- package/dist/interface/input/scoped/files/includes.js +0 -2
- package/dist/interface/input/scoped/files/includes.js.map +0 -1
- package/dist/interface/input/scoped/files/index.d.ts +0 -8
- package/dist/interface/input/scoped/files/index.d.ts.map +0 -1
- package/dist/interface/input/scoped/files/index.js +0 -2
- package/dist/interface/input/scoped/files/index.js.map +0 -1
- package/dist/interface/input/scoped/ignores/defaults.d.ts +0 -3
- package/dist/interface/input/scoped/ignores/defaults.d.ts.map +0 -1
- package/dist/interface/input/scoped/ignores/defaults.js +0 -2
- package/dist/interface/input/scoped/ignores/defaults.js.map +0 -1
- package/dist/interface/input/scoped/ignores/extend.d.ts +0 -3
- package/dist/interface/input/scoped/ignores/extend.d.ts.map +0 -1
- package/dist/interface/input/scoped/ignores/extend.js +0 -2
- package/dist/interface/input/scoped/ignores/extend.js.map +0 -1
- package/dist/interface/input/scoped/ignores/index.d.ts +0 -8
- package/dist/interface/input/scoped/ignores/index.d.ts.map +0 -1
- package/dist/interface/input/scoped/ignores/index.js +0 -2
- package/dist/interface/input/scoped/ignores/index.js.map +0 -1
- package/dist/interface/input/scoped/index.d.ts +0 -10
- package/dist/interface/input/scoped/index.d.ts.map +0 -1
- package/dist/interface/input/scoped/index.js +0 -2
- package/dist/interface/input/scoped/index.js.map +0 -1
- package/dist/interface/input/scoped/rules/defaults.d.ts +0 -3
- package/dist/interface/input/scoped/rules/defaults.d.ts.map +0 -1
- package/dist/interface/input/scoped/rules/defaults.js +0 -2
- package/dist/interface/input/scoped/rules/defaults.js.map +0 -1
- package/dist/interface/input/scoped/rules/index.d.ts +0 -8
- package/dist/interface/input/scoped/rules/index.d.ts.map +0 -1
- package/dist/interface/input/scoped/rules/index.js +0 -2
- package/dist/interface/input/scoped/rules/index.js.map +0 -1
- package/dist/interface/input/scoped/rules/overrides.d.ts +0 -3
- package/dist/interface/input/scoped/rules/overrides.d.ts.map +0 -1
- package/dist/interface/input/scoped/rules/overrides.js +0 -2
- package/dist/interface/input/scoped/rules/overrides.js.map +0 -1
- package/dist/interface/input/settings/env.d.ts +0 -3
- package/dist/interface/input/settings/env.d.ts.map +0 -1
- package/dist/interface/input/settings/env.js +0 -2
- package/dist/interface/input/settings/env.js.map +0 -1
- package/dist/interface/input/settings/index.d.ts +0 -6
- package/dist/interface/input/settings/index.d.ts.map +0 -1
- package/dist/interface/input/settings/index.js +0 -2
- package/dist/interface/input/settings/index.js.map +0 -1
- package/dist/interface/output/global.d.ts +0 -6
- package/dist/interface/output/global.d.ts.map +0 -1
- package/dist/interface/output/global.js +0 -2
- package/dist/interface/output/global.js.map +0 -1
- package/dist/interface/output/index.d.ts +0 -8
- package/dist/interface/output/index.d.ts.map +0 -1
- package/dist/interface/output/index.js +0 -2
- package/dist/interface/output/index.js.map +0 -1
- package/dist/objects/config/global/ignores.d.ts +0 -6
- package/dist/objects/config/global/ignores.d.ts.map +0 -1
- package/dist/objects/config/global/ignores.js +0 -2
- package/dist/objects/config/global/ignores.js.map +0 -1
- package/dist/objects/config/global/system.d.ts +0 -14
- package/dist/objects/config/global/system.d.ts.map +0 -1
- package/dist/objects/config/global/system.js +0 -2
- package/dist/objects/config/global/system.js.map +0 -1
- package/dist/objects/config/index.d.ts +0 -6
- package/dist/objects/config/index.d.ts.map +0 -1
- package/dist/objects/config/index.js +0 -2
- package/dist/objects/config/property.d.ts +0 -2
- package/dist/objects/config/property.d.ts.map +0 -1
- package/dist/objects/config/property.js +0 -2
- package/dist/objects/config/property.js.map +0 -1
- package/dist/objects/config/scoped.d.ts +0 -15
- package/dist/objects/config/scoped.d.ts.map +0 -1
- package/dist/objects/config/scoped.js +0 -2
- package/dist/objects/config/scoped.js.map +0 -1
- package/dist/objects/index.d.ts +0 -4
- package/dist/objects/index.d.ts.map +0 -1
- package/dist/objects/index.js +0 -2
- package/dist/objects/plugins/index.d.ts +0 -5
- package/dist/objects/plugins/index.d.ts.map +0 -1
- package/dist/objects/plugins/index.js +0 -2
- package/dist/objects/plugins/index.js.map +0 -1
- package/dist/objects/plugins/plugin.d.ts +0 -2
- package/dist/objects/plugins/plugin.d.ts.map +0 -1
- package/dist/objects/plugins/plugin.js +0 -2
- package/dist/objects/plugins/plugin.js.map +0 -1
- package/dist/objects/rule/index.d.ts +0 -8
- package/dist/objects/rule/index.d.ts.map +0 -1
- package/dist/objects/rule/index.js +0 -2
- package/dist/objects/rule/index.js.map +0 -1
- package/dist/objects/rule/record/index.d.ts +0 -7
- package/dist/objects/rule/record/index.d.ts.map +0 -1
- package/dist/objects/rule/record/index.js +0 -2
- package/dist/objects/rule/record/index.js.map +0 -1
- package/dist/objects/rule/record/state.d.ts +0 -2
- package/dist/objects/rule/record/state.d.ts.map +0 -1
- package/dist/objects/rule/record/state.js +0 -2
- package/dist/objects/rule/record/state.js.map +0 -1
- package/dist/scopes/index.d.ts.map +0 -1
- package/dist/scopes/index.js.map +0 -1
- package/dist/scopes/index.spec.d.ts +0 -2
- package/dist/scopes/index.spec.d.ts.map +0 -1
- package/dist/scopes/index.spec.js.map +0 -1
- package/src/factory/files.ts +0 -26
- package/src/factory/ignores.ts +0 -26
- package/src/factory/options/option/template/globals.ts +0 -5
- package/src/factory/options/option/template/index.ts +0 -20
- package/src/factory/options/option/template/languageOptions.ts +0 -16
- package/src/factory/rules/index.ts +0 -26
- package/src/factory/rules/ruleset.ts +0 -28
- package/src/interface/input/global/ignores/defaults.ts +0 -6
- package/src/interface/input/global/ignores/extend.ts +0 -5
- package/src/interface/input/global/ignores/index.ts +0 -9
- package/src/interface/input/global/index.ts +0 -7
- package/src/interface/input/imports/index.ts +0 -12
- package/src/interface/input/imports/parsers/index.ts +0 -8
- package/src/interface/input/imports/parsers/parser.ts +0 -10
- package/src/interface/input/imports/plugins.ts +0 -3
- package/src/interface/input/index.ts +0 -20
- package/src/interface/input/scoped/files/defaults.ts +0 -6
- package/src/interface/input/scoped/files/includes.ts +0 -5
- package/src/interface/input/scoped/files/index.ts +0 -9
- package/src/interface/input/scoped/ignores/defaults.ts +0 -6
- package/src/interface/input/scoped/ignores/extend.ts +0 -5
- package/src/interface/input/scoped/ignores/index.ts +0 -9
- package/src/interface/input/scoped/index.ts +0 -15
- package/src/interface/input/scoped/rules/defaults.ts +0 -9
- package/src/interface/input/scoped/rules/index.ts +0 -13
- package/src/interface/input/scoped/rules/overrides.ts +0 -9
- package/src/interface/input/settings/env.ts +0 -6
- package/src/interface/input/settings/index.ts +0 -7
- package/src/interface/output/global.ts +0 -9
- package/src/interface/output/index.ts +0 -12
- package/src/objects/config/global/ignores.ts +0 -13
- package/src/objects/config/global/system.ts +0 -48
- package/src/objects/config/index.ts +0 -8
- package/src/objects/config/property.ts +0 -12
- package/src/objects/config/scoped.ts +0 -15
- package/src/objects/index.ts +0 -11
- package/src/objects/plugins/index.ts +0 -6
- package/src/objects/plugins/plugin.ts +0 -9
- package/src/objects/rule/index.ts +0 -8
- package/src/objects/rule/record/index.ts +0 -7
- package/src/objects/rule/record/state.ts +0 -5
- package/typings/common/literals/chars/alpha.d.ts +0 -4
- package/typings/common/literals/chars/digit.d.ts +0 -12
- package/typings/common/literals/chars/digits/base64.d.ts +0 -13
- package/typings/common/literals/chars/digits/hexchar.d.ts +0 -9
- package/typings/common/literals/chars/lower.d.ts +0 -1
- package/typings/common/literals/chars/upper.d.ts +0 -28
- package/typings/common/literals/numbers/base32.d.ts +0 -19
- package/typings/common/literals/numbers/base64.d.ts +0 -35
- package/typings/common/literals/numbers/binary.d.ts +0 -4
- package/typings/common/literals/numbers/decimal.d.ts +0 -5
- package/typings/common/literals/numbers/hexadecimal.d.ts +0 -10
- package/typings/common/literals/numbers/octal.d.ts +0 -7
- package/typings/common/literals/numbers/quatral.d.ts +0 -4
- package/typings/common/literals/numbers/ternary.d.ts +0 -4
- package/typings/common/primitive.d.ts +0 -5
- package/typings/common/tester.d.ts +0 -8
- package/typings/common/utility/constructor.d.ts +0 -3
- package/typings/common/utility/interface/identity.d.ts +0 -11
- package/typings/common/utility/interface/identity.spec.d.ts +0 -63
- package/typings/common/utility/interface/index.d.ts +0 -5
- package/typings/common/utility/interface/keys.d.ts +0 -3
- package/typings/common/utility/interface/keys.spec.d.ts +0 -67
- package/typings/common/utility/interface/optional.d.ts +0 -7
- package/typings/common/utility/interface/optional.spec.d.ts +0 -34
- package/typings/common/utility/interface/partially.d.ts +0 -1
- package/typings/common/utility/interface/property/index.d.ts +0 -8
- package/typings/common/utility/interface/property/properties.d.ts +0 -6
- package/typings/common/utility/interface/table/index.d.ts +0 -3
- package/typings/common/utility/interface/table/tables.d.ts +0 -5
- package/typings/common/utility/iterable/arrayful.d.ts +0 -1
- package/typings/common/utility/iterable/flat/index.d.ts +0 -3
- package/typings/common/utility/iterable/flat/unflat.d.ts +0 -3
- package/typings/common/utility/iterable/identity.d.ts +0 -1
- package/typings/common/utility/iterable/identity.spec.d.ts +0 -59
- package/typings/common/utility/iterable/index.d.ts +0 -15
- package/typings/common/utility/iterable/index.spec.d.ts +0 -18
- package/typings/common/utility/iterable/tuple.d.ts +0 -11
- package/typings/common/utility/iterable/tuple.spec.d.ts +0 -14
- package/typings/common/utility/iterable/tuples.d.ts +0 -10
- package/typings/common/utility/null/index.d.ts +0 -1
- package/typings/common/utility/null/index.spec.d.ts +0 -13
- package/typings/common/utility/null/nullable.d.ts +0 -1
- package/typings/common/utility/null/nullable.spec.d.ts +0 -13
- package/typings/common/utility/primitive/cast/number.d.ts +0 -13
- package/typings/common/utility/primitive/cast/number.spec.d.ts +0 -57
- package/typings/common/utility/primitive/index.d.ts +0 -11
- package/typings/common/utility/primitive/index.spec.d.ts +0 -27
- package/typings/common/utility/primitive/length.d.ts +0 -5
- package/typings/common/utility/primitive/length.spec.d.ts +0 -26
- package/typings/common/utility/primitive/literal.d.ts +0 -1
- package/typings/common/utility/primitive/literal.spec.d.ts +0 -17
- package/typings/common/utility/primitive/literalful.d.ts +0 -3
- package/typings/common/utility/primitive/literalful.spec.d.ts +0 -20
- package/typings/common/utility/primitive/numeric.d.ts +0 -1
- package/typings/common/utility/primitive/numeric.spec.d.ts +0 -30
- package/typings/common/utility/primitive/truth.d.ts +0 -3
- package/typings/common/utility/primitive/truth.spec.d.ts +0 -22
- package/typings/common/validated/char.d.ts +0 -1
- package/typings/common/validated/index.d.ts +0 -2
- package/typings/common/validated/numberful.d.ts +0 -1
- package/typings/common/validated/properties/finite.d.ts +0 -2
- package/typings/common/validated/properties/int.d.ts +0 -2
- package/typings/common/validated/properties/length.d.ts +0 -3
- package/typings/common/validated/properties/polarity.d.ts +0 -5
- package/typings/common/validated/stringful.d.ts +0 -1
- /package/dist/{factory/options/option/template → config}/index.js +0 -0
- /package/dist/interface/{input/global/ignores → imports}/index.js +0 -0
@@ -0,0 +1,46 @@
|
|
1
|
+
export type OptionProto<
|
2
|
+
ParserOptions extends
|
3
|
+
| object
|
4
|
+
| boolean,
|
5
|
+
G extends string | boolean,
|
6
|
+
Processor extends object,
|
7
|
+
Language extends object,
|
8
|
+
> = (
|
9
|
+
{ languageOptions: (G extends never
|
10
|
+
? object
|
11
|
+
: G extends boolean
|
12
|
+
? object
|
13
|
+
: G extends string
|
14
|
+
? string extends G
|
15
|
+
? object
|
16
|
+
: { globals: Record<string, unknown> }
|
17
|
+
: object
|
18
|
+
)
|
19
|
+
& (
|
20
|
+
ParserOptions extends never
|
21
|
+
? object
|
22
|
+
: ParserOptions extends boolean
|
23
|
+
? ParserOptions extends true
|
24
|
+
? { parser: unknown }
|
25
|
+
: object
|
26
|
+
: { parser: unknown; parserOptions: ParserOptions }
|
27
|
+
); }
|
28
|
+
& (
|
29
|
+
Processor extends never
|
30
|
+
? object
|
31
|
+
: Processor extends { processor: infer P }
|
32
|
+
? string extends P
|
33
|
+
? object
|
34
|
+
: { processor: P }
|
35
|
+
: object
|
36
|
+
)
|
37
|
+
& (
|
38
|
+
Language extends never
|
39
|
+
? object
|
40
|
+
: Language extends { language: infer L }
|
41
|
+
? string extends L
|
42
|
+
? object
|
43
|
+
: { language: L }
|
44
|
+
: object
|
45
|
+
)
|
46
|
+
);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import Option from "
|
1
|
+
import Option from "../option";
|
2
2
|
import type Ts from "./ts";
|
3
3
|
|
4
4
|
export default class Svelte extends Option<
|
@@ -8,7 +8,7 @@ export default class Svelte extends Option<
|
|
8
8
|
extraFileExtensions: readonly [".svelte"];
|
9
9
|
} & Ts["option"]["languageOptions"]["parserOptions"],
|
10
10
|
2,
|
11
|
-
|
11
|
+
false,
|
12
12
|
{ processor: "svelte/svelte" }
|
13
13
|
> {
|
14
14
|
public readonly scope = "svelte";
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import type {
|
2
|
+
Scopes,
|
3
|
+
RuleEntry,
|
4
|
+
RuleRecord,
|
5
|
+
} from "..";
|
6
|
+
|
7
|
+
export class Ruleset {
|
8
|
+
public readonly ruleset: { id: `${Scopes}:${string}`; rules: RuleRecord }[];
|
9
|
+
|
10
|
+
constructor(
|
11
|
+
public readonly scope: Scopes,
|
12
|
+
defaults: RuleEntry[],
|
13
|
+
extension?: RuleRecord,
|
14
|
+
) {
|
15
|
+
const map = ([id, rules]: RuleEntry) => ({
|
16
|
+
id: `${scope}:${id}`,
|
17
|
+
rules,
|
18
|
+
} as const);
|
19
|
+
|
20
|
+
this.ruleset = [
|
21
|
+
...defaults.map(rule => map(rule)),
|
22
|
+
...typeof extension === "undefined"
|
23
|
+
? []
|
24
|
+
: [map([`${scope}:override`, extension])],
|
25
|
+
];
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import type { Input, Scopes } from "..";
|
2
|
+
import { Ruleset } from "./ruleset";
|
3
|
+
|
4
|
+
export class ScopeFactory {
|
5
|
+
constructor(
|
6
|
+
public readonly defaultScopes: Pick<Input["defaults"], "files" | "ignores" | "rules">,
|
7
|
+
public readonly extensions: Omit<Input["extensions"], "*">,
|
8
|
+
) {}
|
9
|
+
|
10
|
+
public produce(scope: Scopes) {
|
11
|
+
return [
|
12
|
+
[...this.defaultScopes.files[scope], ...this.extensions[scope]?.files ?? []] as string[],
|
13
|
+
[...this.defaultScopes.ignores[scope], ...this.extensions[scope]?.ignores ?? []] as string[],
|
14
|
+
new Ruleset(scope, this.defaultScopes.rules[scope], this.extensions[scope]?.rules),
|
15
|
+
] as const;
|
16
|
+
}
|
17
|
+
}
|
package/src/index.ts
CHANGED
@@ -1,52 +1,36 @@
|
|
1
|
-
|
2
|
-
export type {
|
3
|
-
Plugins,
|
4
|
-
RuleEntry,
|
5
|
-
RuleRecord,
|
6
|
-
RuleState,
|
7
|
-
GlobalConfigSystem,
|
8
|
-
GlobalConfigIgnores,
|
9
|
-
ScopedConfig,
|
10
|
-
} from "./objects";
|
1
|
+
import type { Input, Output } from "./interface";
|
11
2
|
|
12
|
-
|
13
|
-
Input,
|
14
|
-
Output,
|
15
|
-
} from "./interface";
|
16
|
-
|
17
|
-
export type {
|
18
|
-
Input,
|
19
|
-
Output,
|
20
|
-
};
|
3
|
+
export type { Scopes } from "./scopes";
|
21
4
|
|
22
5
|
import { scopes } from "./scopes";
|
23
6
|
import {
|
24
|
-
|
25
|
-
|
7
|
+
GlobalFactory,
|
8
|
+
ScopeFactory,
|
26
9
|
Options,
|
27
10
|
} from "./factory";
|
28
11
|
|
12
|
+
export type * from "./interface";
|
13
|
+
export type * from "./config";
|
29
14
|
export default function (
|
30
15
|
{
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
rules,
|
16
|
+
imports: {
|
17
|
+
plugins,
|
18
|
+
parsers,
|
19
|
+
},
|
20
|
+
defaults,
|
21
|
+
extensions,
|
38
22
|
}: Input,
|
39
23
|
): Output {
|
40
24
|
try {
|
41
|
-
const global = new
|
25
|
+
const global = new GlobalFactory(
|
42
26
|
plugins,
|
43
|
-
settings,
|
44
|
-
|
27
|
+
defaults.settings,
|
28
|
+
defaults.ignores["*"],
|
29
|
+
extensions["*"],
|
45
30
|
),
|
46
|
-
factory = new
|
47
|
-
|
48
|
-
|
49
|
-
rules,
|
31
|
+
factory = new ScopeFactory(
|
32
|
+
defaults,
|
33
|
+
extensions,
|
50
34
|
),
|
51
35
|
options: { [S in typeof scopes[number]]: InstanceType<typeof Options[S]>["configs"] } = {
|
52
36
|
js: new Options
|
package/src/interface/index.ts
CHANGED
@@ -1,11 +1,3 @@
|
|
1
|
-
export type
|
2
|
-
|
3
|
-
|
4
|
-
RuleEntry,
|
5
|
-
RuleRecord,
|
6
|
-
GlobalConfigSystem,
|
7
|
-
GlobalConfigIgnores,
|
8
|
-
ScopedConfig,
|
9
|
-
} from "..";
|
10
|
-
export type { Input } from "./input";
|
11
|
-
export type { Output } from "./output";
|
1
|
+
export type * from "./input";
|
2
|
+
export type * from "./output";
|
3
|
+
export type * from "./imports";
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import type {
|
2
|
+
Scopes,
|
3
|
+
Config,
|
4
|
+
RuleEntry,
|
5
|
+
} from "..";
|
6
|
+
import type { ImportPlugins, ImportParsers } from "./imports";
|
7
|
+
|
8
|
+
export interface Input {
|
9
|
+
imports: {
|
10
|
+
plugins: Config<ImportPlugins>["plugins"];
|
11
|
+
parsers: Record<
|
12
|
+
ImportParsers & Scopes,
|
13
|
+
unknown
|
14
|
+
>;
|
15
|
+
};
|
16
|
+
defaults: {
|
17
|
+
settings: Config["linterOptions"] & Pick<Config["languageOptions"], "ecmaVersion" | "sourceType">;
|
18
|
+
files: Record<"*" | Scopes, string[]>;
|
19
|
+
ignores: Input["defaults"]["files"];
|
20
|
+
rules: Record<Scopes, RuleEntry[]>;
|
21
|
+
};
|
22
|
+
extensions: Partial<
|
23
|
+
& Record<"*", Partial<Input["defaults"]["settings"] & Pick<Config, "ignores"> & { override?: boolean }>>
|
24
|
+
& Record<Scopes, Partial<Pick<Config, "files" | "ignores" | "rules">>>
|
25
|
+
>;
|
26
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import type {
|
2
|
+
Scopes,
|
3
|
+
Config,
|
4
|
+
} from "..";
|
5
|
+
import type { ImportPlugins } from "./imports";
|
6
|
+
|
7
|
+
export type Exclusive<Base extends object, Cool extends object> = Cool & Partial<Record<Exclude<keyof Base, keyof Cool>, never>>;
|
8
|
+
export type Output = [
|
9
|
+
Exclusive<
|
10
|
+
Config,
|
11
|
+
{
|
12
|
+
name: `linted/*/settings`;
|
13
|
+
languageOptions: Pick<Config["languageOptions"], "ecmaVersion" | "sourceType">;
|
14
|
+
} & Pick<Config<ImportPlugins>, "plugins" | "linterOptions">
|
15
|
+
>,
|
16
|
+
Exclusive<
|
17
|
+
Config,
|
18
|
+
{ name: `linted/*/ignores` } & Pick<Config, "ignores">
|
19
|
+
>,
|
20
|
+
...({
|
21
|
+
name: `linted/${Scopes}:${string}`;
|
22
|
+
languageOptions: Omit<Config["languageOptions"], "sourceType" | "ecmaVersion">;
|
23
|
+
} & Pick<Config, "files" | "ignores" | "rules" | "processor" | "language" | "settings">)[],
|
24
|
+
];
|
package/dist/factory/files.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/factory/files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;AAE/B,qBAAa,KAAK;IAChB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA+B;gBAE1C,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC;IAc1B,KAAK,CAAC,KAAK,EAAE,MAAM,GAIS,MAAM,EAAE;CAE5C"}
|
package/dist/factory/files.js
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
export class Files {
|
2
|
-
_files = new Map();
|
3
|
-
constructor(files) {
|
4
|
-
const { files: defaults, includes } = files, scopes = Object.keys(defaults);
|
5
|
-
for (const scope of scopes)
|
6
|
-
this._files.set(scope, [
|
7
|
-
...defaults[scope],
|
8
|
-
...scope in includes ? includes[scope] : [],
|
9
|
-
]);
|
10
|
-
}
|
11
|
-
files(scope) {
|
12
|
-
if (!this._files.has(scope))
|
13
|
-
throw new ReferenceError(`Files not found for scope: ${scope}`);
|
14
|
-
return this._files.get(scope);
|
15
|
-
}
|
16
|
-
}
|
17
|
-
//# sourceMappingURL=files.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/factory/files.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,KAAK;IACC,MAAM,GAAG,IAAI,GAAG,EAAoB,CAAC;IAEtD,YAAY,KAAqB;QAC/B,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,EAC3C,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAA8B,CAAC;QAE5D,KAAK,MAAM,KAAK,IAAI,MAAM;YACxB,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,KAAK,EACL;gBACE,GAAG,QAAQ,CAAC,KAAK,CAAC;gBAClB,GAAG,KAAK,IAAI,QAAQ,CAAC,CAAC,CAAE,QAAQ,CAAC,KAAK,CAAc,CAAC,CAAC,CAAC,EAAE;aAC1D,CACF,CAAC;IACN,CAAC;IAEM,KAAK,CAAC,KAAa;QACxB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;YACzB,MAAM,IAAI,cAAc,CAAC,8BAA8B,KAAK,EAAE,CAAC,CAAC;QAElE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAa,CAAC;IAC5C,CAAC;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ignores.d.ts","sourceRoot":"","sources":["../../src/factory/ignores.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;AAE/B,qBAAa,OAAO;IAClB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA+B;gBAE5C,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IAc9B,OAAO,CAAC,KAAK,EAAE,MAAM,GAIS,MAAM,EAAE;CAE9C"}
|
package/dist/factory/ignores.js
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
export class Ignores {
|
2
|
-
_ignores = new Map();
|
3
|
-
constructor(ignores) {
|
4
|
-
const { ignores: defaults, extend } = ignores, scopes = Object.keys(defaults);
|
5
|
-
for (const scope of scopes)
|
6
|
-
this._ignores.set(scope, [
|
7
|
-
...defaults[scope],
|
8
|
-
...scope in extend ? extend[scope] : [],
|
9
|
-
]);
|
10
|
-
}
|
11
|
-
ignores(scope) {
|
12
|
-
if (!this._ignores.has(scope))
|
13
|
-
throw new ReferenceError(`Files not found for scope: ${scope}`);
|
14
|
-
return this._ignores.get(scope);
|
15
|
-
}
|
16
|
-
}
|
17
|
-
//# sourceMappingURL=ignores.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ignores.js","sourceRoot":"","sources":["../../src/factory/ignores.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,OAAO;IACD,QAAQ,GAAG,IAAI,GAAG,EAAoB,CAAC;IAExD,YAAY,OAAyB;QACnC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,EAC7C,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAA8B,CAAC;QAE5D,KAAK,MAAM,KAAK,IAAI,MAAM;YACxB,IAAI,CAAC,QAAQ,CAAC,GAAG,CACf,KAAK,EACL;gBACE,GAAG,QAAQ,CAAC,KAAK,CAAC;gBAClB,GAAG,KAAK,IAAI,MAAM,CAAC,CAAC,CAAE,MAAM,CAAC,KAAK,CAAc,CAAC,CAAC,CAAC,EAAE;aACtD,CACF,CAAC;IACN,CAAC;IAEM,OAAO,CAAC,KAAa;QAC1B,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC;YAC3B,MAAM,IAAI,cAAc,CAAC,8BAA8B,KAAK,EAAE,CAAC,CAAC;QAElE,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAa,CAAC;IAC9C,CAAC;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../../src/factory/options/html.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,MAAM,CACtC,MAAM,EACN,IAAI,EACJ,CAAC,CACF;IACC,SAAgB,KAAK,UAAU;IAC/B,SAAgB,SAAS,KAAM;IAC/B,SAAgB,QAAQ,KAAM;IAE9B,IAAW,eAAe;;MAIzB;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"html.js","sourceRoot":"","sources":["../../../src/factory/options/html.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,MAIjC;IACiB,KAAK,GAAG,MAAM,CAAC;IACf,SAAS,GAAG,EAAE,CAAC;IACf,QAAQ,GAAG,EAAE,CAAC;IAE9B,IAAW,eAAe;QACxB,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QAE7B,OAAO,EAAE,MAAM,EAAW,CAAC;IAC7B,CAAC;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"js.d.ts","sourceRoot":"","sources":["../../../src/factory/options/js.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,EAAG,SAAQ,MAAM,CAAC,IAAI,CAAC;IAC1C,SAAgB,KAAK,QAAQ;IAC7B,SAAgB,SAAS,KAAM;IAC/B,SAAgB,QAAQ,KAAM;IAE9B,IAAW,eAAe,OAEzB;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"js.js","sourceRoot":"","sources":["../../../src/factory/options/js.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,EAAG,SAAQ,MAAY;IAC1B,KAAK,GAAG,IAAI,CAAC;IACb,SAAS,GAAG,EAAE,CAAC;IACf,QAAQ,GAAG,EAAE,CAAC;IAE9B,IAAW,eAAe;QACxB,OAAO,EAAE,CAAC;IACZ,CAAC;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../src/factory/options/json.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,MAAM,CACtC,MAAM,EACN,IAAI,EACJ,CAAC,CACF;IACC,SAAgB,KAAK,UAAU;IAC/B,SAAgB,SAAS,KAAM;IAC/B,SAAgB,QAAQ,KAAM;IAE9B,IAAW,eAAe;;MAIzB;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../../src/factory/options/json.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,MAIjC;IACiB,KAAK,GAAG,MAAM,CAAC;IACf,SAAS,GAAG,EAAE,CAAC;IACf,QAAQ,GAAG,EAAE,CAAC;IAE9B,IAAW,eAAe;QACxB,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QAE7B,OAAO,EAAE,MAAM,EAAW,CAAC;IAC7B,CAAC;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"jsonc.d.ts","sourceRoot":"","sources":["../../../src/factory/options/jsonc.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,MAAM,CACvC,OAAO,EACP,IAAI,EACJ,CAAC,CACF;IACC,SAAgB,KAAK,WAAW;IAChC,SAAgB,SAAS,KAAM;IAC/B,SAAgB,QAAQ,KAAM;IAE9B,IAAW,eAAe;;MAIzB;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"jsonc.js","sourceRoot":"","sources":["../../../src/factory/options/jsonc.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,MAIlC;IACiB,KAAK,GAAG,OAAO,CAAC;IAChB,SAAS,GAAG,EAAE,CAAC;IACf,QAAQ,GAAG,EAAE,CAAC;IAE9B,IAAW,eAAe;QACxB,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QAE7B,OAAO,EAAE,MAAM,EAAW,CAAC;IAC7B,CAAC;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"mocha.d.ts","sourceRoot":"","sources":["../../../src/factory/options/mocha.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,MAAM,CAAC;AAE3B,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,MAAM,CACvC,OAAO,EACP,EAAE,CAAC,QAAQ,CAAC,CAAC,iBAAiB,CAAC,CAAC,eAAe,CAAC,EAChD,CAAC,EACD,OAAO,CACR;IACC,SAAgB,KAAK,WAAW;IAChC,SAAgB,SAAS,KAAM;IAC/B,SAAgB,QAAQ,KAAM;IAC9B,SAAgB,KAAK,qBAAsB;IAE3C,IAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAazB;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"mocha.js","sourceRoot":"","sources":["../../../src/factory/options/mocha.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAG9B,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,MAKlC;IACiB,KAAK,GAAG,OAAO,CAAC;IAChB,SAAS,GAAG,EAAE,CAAC;IACf,QAAQ,GAAG,EAAE,CAAC;IACd,KAAK,GAAG,CAAC,OAAO,CAAU,CAAC;IAE3C,IAAW,eAAe;QACxB,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,EAC5B,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAEhC,OAAO;YACL,MAAM;YACN,aAAa,EAAE;gBACb,OAAO,EAAE,eAAe;gBACxB,UAAU,EAAE,QAAQ;gBACpB,WAAW,EAAE,IAAI;aAClB;YACD,OAAO;SACC,CAAC;IACb,CAAC;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/factory/options/option/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAY9B,MAAM,CAAC,OAAO,OAAgB,MAAM;IAuBhB;IACA;IACA;IACA;IAJlB,YACkB,MAAmC,EACnC,KAAe,EACf,OAAiB,EACjB,OAAgB;QAHhB,WAAM,GAAN,MAAM,CAA6B;QACnC,UAAK,GAAL,KAAK,CAAU;QACf,YAAO,GAAP,OAAO,CAAU;QACjB,YAAO,GAAP,OAAO,CAAS;IAC/B,CAAC;IAEJ,IAAW,OAAO;QAChB,MAAM,EACJ,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,MAAM,GACP,GAAG,IAAI,CAAC;QAET,IAAI,OAAO,CAAC,KAAK,KAAK,KAAK;YACzB,MAAM,IAAI,SAAS,CAAC,2CAA2C,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAEzH,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC;YACrB,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;gBACtC,OAAO;oBACL,IAAI,EAAE,UAAU,EAAE,EAAE;oBACpB,KAAK;oBACL,OAAO;oBACP,KAAK;oBACL,GAAG,MAAM;iBACV,CAAC;YACJ,CAAC,CAAC,CAAC;IACP,CAAC;IAED,IAAY,MAAM;QAChB,IAAI,CAAC;YACH,MAAM,EACJ,eAAe,EACf,SAAS,EACT,QAAQ,GACT,GAAG,IAAI,CAAC;YAET,OAAO;gBACL,eAAe;gBACf,GAAG,SAAS;gBACZ,GAAG,QAAQ;aAMZ,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YAAC,MAAM,IAAI,KAAK,CAAC,+BAA+B,IAAI,CAAC,KAAK,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;QAAC,CAAC;IACnG,CAAC;IAIS,OAAO,CAAC,IAAY;QAC5B,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/template/globals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,OAAO,GAAG,CACzC,OAAO,CACV,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"globals.js","sourceRoot":"","sources":["../../../../../src/factory/options/option/template/globals.ts"],"names":[],"mappings":""}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import type { LanguageOptions } from "./languageOptions.js";
|
2
|
-
import type { Globals } from "./globals.js";
|
3
|
-
export type { LanguageOptions, Globals, };
|
4
|
-
export type OptionTemplate<ParserOptions extends boolean | object, GlobalTypes extends Globals, Processor extends object, Language extends object> = {
|
5
|
-
languageOptions: LanguageOptions<ParserOptions, GlobalTypes>;
|
6
|
-
} & (Interface<Processor> extends never ? object : Interface<Processor> extends {
|
7
|
-
processor: string;
|
8
|
-
} ? Interface<Processor> : object) & (Interface<Language> extends never ? object : Interface<Language> extends {
|
9
|
-
language: string;
|
10
|
-
} ? Interface<Language> : object);
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/template/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,YAAY,EACV,eAAe,EACf,OAAO,GACR,CAAC;AACF,MAAM,MAAM,cAAc,CACxB,aAAa,SACX,OAAO,GACP,MAAM,EACR,WAAW,SAAS,OAAO,EAC3B,SAAS,SAAS,MAAM,EACxB,QAAQ,SAAS,MAAM,IAErB;IACA,eAAe,EAAE,eAAe,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;CAC9D,GACC,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,SAAS;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,GAClI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,SAAS;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/factory/options/option/template/index.ts"],"names":[],"mappings":""}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
export type LanguageOptions<ParserOptions extends object | boolean, GlobalTypes extends string> = (literalful<GlobalTypes> extends never ? object : {
|
2
|
-
globals: Record<string, unknown>;
|
3
|
-
}) & (ParserOptions extends boolean ? Truth<ParserOptions> extends never ? object : {
|
4
|
-
parser: unknown;
|
5
|
-
} : ParserOptions extends object ? Interface<ParserOptions> extends never ? object : {
|
6
|
-
parser: unknown;
|
7
|
-
parserOptions: ParserOptions;
|
8
|
-
} : object);
|
9
|
-
//# sourceMappingURL=languageOptions.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"languageOptions.d.ts","sourceRoot":"","sources":["../../../../../src/factory/options/option/template/languageOptions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,CACzB,aAAa,SAAS,MAAM,GAAG,OAAO,EACtC,WAAW,SAAS,MAAM,IAEzB,CAAC,UAAU,CAAC,WAAW,CAAC,SAAS,KAAK,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAAC,GACvF,CACC,aAAa,SAAS,OAAO,GACzB,KAAK,CAAC,aAAa,CAAC,SAAS,KAAK,GAChC,MAAM,GACN;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GACrB,aAAa,SAAS,MAAM,GAC1B,SAAS,CAAC,aAAa,CAAC,SAAS,KAAK,GACpC,MAAM,GACN;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,aAAa,CAAA;CAAE,GACnD,MAAM,CACb,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"languageOptions.js","sourceRoot":"","sources":["../../../../../src/factory/options/option/template/languageOptions.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"svelte.d.ts","sourceRoot":"","sources":["../../../src/factory/options/svelte.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,MAAM,CAAC;AAE3B,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,MAAM,CACxC,QAAQ,EACR;IACE,MAAM,EAAE,OAAO,CAAC;IAChB,mBAAmB,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC3C,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,iBAAiB,CAAC,CAAC,eAAe,CAAC,EACpD,CAAC,EACD,KAAK,EACL;IAAE,SAAS,EAAE,eAAe,CAAA;CAAE,CAC/B;IACC,SAAgB,KAAK,YAAY;IACjC,SAAgB,SAAS;;MAA2C;IACpE,SAAgB,QAAQ,KAAM;IAE9B,IAAW,eAAe;;;;;;;;;MAazB;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"svelte.js","sourceRoot":"","sources":["../../../src/factory/options/svelte.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAG9B,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,MASnC;IACiB,KAAK,GAAG,QAAQ,CAAC;IACjB,SAAS,GAAG,EAAE,SAAS,EAAE,eAAe,EAAW,CAAC;IACpD,QAAQ,GAAG,EAAE,CAAC;IAE9B,IAAW,eAAe;QACxB,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QAEvC,OAAO;YACL,MAAM;YACN,aAAa,EAAE;gBACb,MAAM,EAAE,QAAQ;gBAChB,mBAAmB,EAAE,CAAC,SAAS,CAAU;gBACzC,OAAO,EAAE,eAAe;gBACxB,UAAU,EAAE,QAAQ;gBACpB,WAAW,EAAE,IAAI;aAClB;SACO,CAAC;IACb,CAAC;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ts.d.ts","sourceRoot":"","sources":["../../../src/factory/options/ts.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,EAAG,SAAQ,MAAM,CACpC,IAAI,EACJ;IACE,OAAO,EAAE,eAAe,CAAC;IACzB,UAAU,EAAE,QAAQ,CAAC;IACrB,WAAW,EAAE,IAAI,CAAC;CACnB,EACD,CAAC,CACF;IACC,SAAgB,KAAK,QAAQ;IAC7B,SAAgB,SAAS,KAAM;IAC/B,SAAgB,QAAQ,KAAM;IAE9B,IAAW,eAAe;;;;;;;MAWzB;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ts.js","sourceRoot":"","sources":["../../../src/factory/options/ts.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,EAAG,SAAQ,MAQ/B;IACiB,KAAK,GAAG,IAAI,CAAC;IACb,SAAS,GAAG,EAAE,CAAC;IACf,QAAQ,GAAG,EAAE,CAAC;IAE9B,IAAW,eAAe;QACxB,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QAE7B,OAAO;YACL,MAAM;YACN,aAAa,EAAE;gBACb,OAAO,EAAE,eAAe;gBACxB,UAAU,EAAE,QAAQ;gBACpB,WAAW,EAAE,IAAI;aAClB;SACO,CAAC;IACb,CAAC;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"yml.d.ts","sourceRoot":"","sources":["../../../src/factory/options/yml.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,MAAM,CACrC,KAAK,EACL,IAAI,EACJ,CAAC,CACF;IACC,SAAgB,KAAK,SAAS;IAC9B,SAAgB,SAAS,KAAM;IAC/B,SAAgB,QAAQ,KAAM;IAE9B,IAAW,eAAe;;MAIzB;CACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"yml.js","sourceRoot":"","sources":["../../../src/factory/options/yml.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,MAIhC;IACiB,KAAK,GAAG,KAAK,CAAC;IACd,SAAS,GAAG,EAAE,CAAC;IACf,QAAQ,GAAG,EAAE,CAAC;IAE9B,IAAW,eAAe;QACxB,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QAE7B,OAAO,EAAE,MAAM,EAAW,CAAC;IAC7B,CAAC;CACF"}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
export type { RuleEntry, RuleRecord, } from "../index.js";
|
2
|
-
import type { Input } from "../index.js";
|
3
|
-
import { Ruleset } from "./ruleset.js";
|
4
|
-
export declare class Rules {
|
5
|
-
private readonly rulesets;
|
6
|
-
constructor(rules: Input["rules"]);
|
7
|
-
rules(scope: string): Ruleset;
|
8
|
-
}
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/factory/rules/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,SAAS,EACT,UAAU,GACX,MAAM,IAAI,CAAC;AAEZ,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,qBAAa,KAAK;IAChB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA8B;gBAE3C,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC;IAQ1B,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;CAMrC"}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import { Ruleset } from "./ruleset.js";
|
2
|
-
export class Rules {
|
3
|
-
rulesets = new Map();
|
4
|
-
constructor(rules) {
|
5
|
-
const { rules: base, overrides } = rules, scopes = Object.keys(base);
|
6
|
-
for (const scope of scopes)
|
7
|
-
this.rulesets.set(scope, new Ruleset(scope, base[scope], overrides[scope]));
|
8
|
-
}
|
9
|
-
rules(scope) {
|
10
|
-
if (!this.rulesets.has(scope))
|
11
|
-
throw new ReferenceError(`Ruleset not found for scope: ${scope}`);
|
12
|
-
return this.rulesets.get(scope);
|
13
|
-
}
|
14
|
-
}
|
15
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/factory/rules/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,OAAO,KAAK;IACC,QAAQ,GAAG,IAAI,GAAG,EAAmB,CAAC;IAEvD,YAAY,KAAqB;QAC/B,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,EACxC,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAA0B,CAAC;QAEpD,KAAK,MAAM,KAAK,IAAI,MAAM;YACxB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAChF,CAAC;IAEM,KAAK,CAAC,KAAa;QACxB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC;YAC3B,MAAM,IAAI,cAAc,CAAC,gCAAgC,KAAK,EAAE,CAAC,CAAC;QAEpE,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAY,CAAC;IAC7C,CAAC;CACF"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import type { RuleEntry, RuleRecord } from "./index.js";
|
2
|
-
export declare class Ruleset {
|
3
|
-
readonly scope: string;
|
4
|
-
readonly ruleset: {
|
5
|
-
id: string;
|
6
|
-
rules: RuleRecord;
|
7
|
-
}[];
|
8
|
-
constructor(scope: string, rules: RuleEntry[], override?: RuleRecord);
|
9
|
-
}
|
10
|
-
//# sourceMappingURL=ruleset.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ruleset.d.ts","sourceRoot":"","sources":["../../../src/factory/rules/ruleset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACX,MAAM,GAAG,CAAC;AAEX,qBAAa,OAAO;aAIA,KAAK,EAAE,MAAM;IAH/B,SAAgB,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,UAAU,CAAA;KAAE,EAAE,CAAC;gBAG3C,KAAK,EAAE,MAAM,EAC7B,KAAK,EAAE,SAAS,EAAE,EAClB,QAAQ,CAAC,EAAE,UAAU;CAgBxB"}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
export class Ruleset {
|
2
|
-
scope;
|
3
|
-
ruleset;
|
4
|
-
constructor(scope, rules, override) {
|
5
|
-
this.scope = scope;
|
6
|
-
const map = ([id, rules]) => {
|
7
|
-
return {
|
8
|
-
id: `${scope}:${id}`,
|
9
|
-
rules,
|
10
|
-
};
|
11
|
-
};
|
12
|
-
this.ruleset = [
|
13
|
-
...rules.map(rule => map(rule)),
|
14
|
-
...typeof override === "undefined"
|
15
|
-
? []
|
16
|
-
: [map([`${scope}:override`, override])],
|
17
|
-
];
|
18
|
-
}
|
19
|
-
}
|
20
|
-
//# sourceMappingURL=ruleset.js.map
|