@open-xchange/linter-presets 0.0.1 → 0.0.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/CHANGELOG.md +21 -0
- package/README.md +21 -8
- package/lib/eslint/README.md +83 -0
- package/lib/eslint/config/base.js +0 -1
- package/lib/eslint/config/imports.js +68 -0
- package/lib/eslint/config/js.js +1 -1
- package/lib/eslint/config/ts.js +1 -1
- package/lib/eslint/env/browser.d.ts +10 -2
- package/lib/eslint/env/browser.js +44 -30
- package/lib/eslint/env/browser.md +33 -0
- package/lib/eslint/env/codecept.d.ts +2 -1
- package/lib/eslint/env/codecept.md +35 -0
- package/lib/eslint/env/eslint.d.ts +14 -0
- package/lib/eslint/env/eslint.js +41 -0
- package/lib/eslint/env/eslint.md +32 -0
- package/lib/eslint/env/jest.d.ts +2 -1
- package/lib/eslint/env/jest.md +32 -0
- package/lib/eslint/env/node.d.ts +8 -1
- package/lib/eslint/env/node.js +10 -6
- package/lib/eslint/env/node.md +34 -0
- package/lib/eslint/env/project.d.ts +21 -0
- package/lib/eslint/env/{plugin.js → project.js} +23 -22
- package/lib/eslint/env/project.md +129 -0
- package/lib/eslint/env/react.d.ts +2 -1
- package/lib/eslint/env/react.md +39 -0
- package/lib/eslint/env/tsconfig.d.ts +2 -1
- package/lib/eslint/env/tsconfig.js +0 -2
- package/lib/eslint/env/tsconfig.md +35 -0
- package/lib/eslint/env/vitest.d.ts +2 -1
- package/lib/eslint/env/vitest.md +36 -0
- package/lib/eslint/index.d.ts +8 -55
- package/lib/eslint/index.js +16 -10
- package/lib/eslint/rules/no-amd-module-directive.js +57 -0
- package/lib/eslint/rules/no-invalid-modules.js +206 -0
- package/lib/eslint/shared/env-utils.d.ts +97 -0
- package/lib/eslint/shared/env-utils.js +105 -0
- package/lib/eslint/shared/rule-utils.js +143 -0
- package/lib/eslint/shared/types.d.ts +25 -8
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/stylelint/README.md +46 -0
- package/lib/stylelint/index.d.ts +18 -0
- package/lib/stylelint/index.js +106 -0
- package/lib/stylelint/types.d.ts +44 -0
- package/package.json +89 -60
- package/doc/eslint.md +0 -343
- package/doc/stylelint.md +0 -3
- package/lib/eslint/env/plugin.d.ts +0 -13
- package/lib/eslint/shared/constants.js +0 -33
- /package/{doc/utils.md → lib/utils/README.md} +0 -0
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// constants ==================================================================
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Shared options for the core rule `no-unused-vars`, and the plugin rule
|
|
6
|
-
* `@typescript-eslint/no-unused-vars`.
|
|
7
|
-
*/
|
|
8
|
-
export const NO_UNUSED_VARS_OPTIONS = {
|
|
9
|
-
varsIgnorePattern: "^_",
|
|
10
|
-
argsIgnorePattern: "^_",
|
|
11
|
-
destructuredArrayIgnorePattern: "^_",
|
|
12
|
-
caughtErrors: "all",
|
|
13
|
-
ignoreRestSiblings: true,
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Global symbols to be banned in all source code files, to be used in the core
|
|
18
|
-
* rule "no-restricted-globals".
|
|
19
|
-
*/
|
|
20
|
-
export const RESTRICTED_GLOBALS = [
|
|
21
|
-
{ name: "isFinite", message: "Use 'Number.isFinite' instead." },
|
|
22
|
-
{ name: "isNaN", message: "Use 'Number.isNaN' instead." },
|
|
23
|
-
];
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Syntax constructs to be banned in all source code files, to be used in the
|
|
27
|
-
* core rule "no-restricted-syntax".
|
|
28
|
-
*/
|
|
29
|
-
export const RESTRICTED_SYNTAX = [
|
|
30
|
-
{ selector: ":matches(PropertyDefinition, MethodDefinition[kind!='constructor'])[accessibility='public']", message: "Remove 'public' keyword." },
|
|
31
|
-
{ selector: ":matches(PropertyDefinition, MethodDefinition[kind!='constructor'])[accessibility='private']", message: "Use #private syntax instead." },
|
|
32
|
-
{ selector: "MethodDefinition[kind='constructor'] TSParameterProperty[accessibility]", message: "Use explicit class properties." },
|
|
33
|
-
];
|
|
File without changes
|