@qlik/eslint-config 0.8.1 → 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.
Files changed (45) hide show
  1. package/README.md +137 -80
  2. package/package.json +37 -43
  3. package/src/configs/cjs.js +45 -0
  4. package/src/configs/esm.js +43 -0
  5. package/src/configs/jest.js +24 -0
  6. package/src/configs/playwright.js +19 -0
  7. package/src/configs/react.js +75 -0
  8. package/src/configs/recommended.js +64 -0
  9. package/src/configs/rules/eslint-core.js +970 -0
  10. package/src/configs/rules/import-x.js +159 -0
  11. package/src/configs/rules/index.js +17 -0
  12. package/src/configs/rules/node.js +10 -0
  13. package/src/configs/rules/react-a11y.js +232 -0
  14. package/src/configs/rules/react-hooks.js +16 -0
  15. package/src/configs/rules/react.js +479 -0
  16. package/src/configs/rules/svelte.js +11 -0
  17. package/src/configs/rules/testing-library.js +74 -0
  18. package/src/configs/rules/typescript.js +228 -0
  19. package/src/configs/svelte.js +48 -0
  20. package/src/configs/vitest.js +36 -0
  21. package/src/index.d.ts +24 -0
  22. package/src/index.js +29 -0
  23. package/src/types/index.ts +52 -0
  24. package/src/utils/compose.js +62 -0
  25. package/src/utils/config.js +22 -0
  26. package/src/utils/merge.js +28 -0
  27. package/configs/airbnb-base-mod.js +0 -77
  28. package/configs/airbnb-mod.js +0 -17
  29. package/configs/airbnb-ts-base-mod.js +0 -37
  30. package/configs/airbnb-ts-mod.js +0 -17
  31. package/configs/env.js +0 -11
  32. package/esm.js +0 -6
  33. package/index.js +0 -10
  34. package/jest.js +0 -25
  35. package/node.js +0 -10
  36. package/overrides/react.js +0 -27
  37. package/overrides/sveltejs.js +0 -25
  38. package/overrides/sveltets.js +0 -32
  39. package/overrides/ts.js +0 -23
  40. package/playwright.js +0 -12
  41. package/react-svelte.js +0 -6
  42. package/react.js +0 -3
  43. package/svelte-js.js +0 -6
  44. package/svelte.js +0 -6
  45. package/vitest.js +0 -13
@@ -1,17 +0,0 @@
1
- module.exports = {
2
- extends: ["./airbnb-ts-base-mod.js"],
3
- rules: {
4
- // modifies airbnb rules for react
5
- "react/jsx-props-no-spreading": "off",
6
- "react/jsx-uses-react": "off",
7
- "react/react-in-jsx-scope": "off",
8
- "react/forbid-prop-types": "off",
9
- "react/function-component-definition": [
10
- 2,
11
- {
12
- namedComponents: "arrow-function",
13
- unnamedComponents: "arrow-function",
14
- },
15
- ],
16
- },
17
- };
package/configs/env.js DELETED
@@ -1,11 +0,0 @@
1
- module.exports = {
2
- env: {
3
- browser: true,
4
- node: true,
5
- es2022: true,
6
- },
7
- parserOptions: {
8
- sourceType: "module",
9
- ecmaVersion: "2022",
10
- },
11
- };
package/esm.js DELETED
@@ -1,6 +0,0 @@
1
- module.exports = {
2
- extends: ["./node"],
3
- rules: {
4
- "import/extensions": ["error", "ignorePackages"],
5
- },
6
- };
package/index.js DELETED
@@ -1,10 +0,0 @@
1
- module.exports = {
2
- extends: [
3
- "eslint:recommended",
4
- "airbnb-base",
5
- "./configs/airbnb-base-mod",
6
- "prettier",
7
- "./overrides/ts",
8
- "./configs/env",
9
- ],
10
- };
package/jest.js DELETED
@@ -1,25 +0,0 @@
1
- module.exports = {
2
- overrides: [
3
- {
4
- files: [
5
- "test/**/*.{js,ts,jsx,tsx}",
6
- "**/__test__/**/*.{js,ts,jsx,tsx}",
7
- "**/__tests__/**/*.{js,ts,jsx,tsx}",
8
- "**/*.spec.{js,ts,jsx,tsx}",
9
- "**/*.test.{js,ts,jsx,tsx}",
10
- ],
11
- extends: ["plugin:jest/recommended"],
12
- plugins: ["jest", "testing-library"],
13
- env: {
14
- commonjs: true,
15
- node: true,
16
- "jest/globals": true,
17
- },
18
- rules: {
19
- "import/no-extraneous-dependencies": "off",
20
- "@typescript-eslint/unbound-method": "off",
21
- "jest/unbound-method": "error",
22
- },
23
- },
24
- ],
25
- };
package/node.js DELETED
@@ -1,10 +0,0 @@
1
- module.exports = {
2
- extends: ["./index"],
3
- env: {
4
- node: true,
5
- browser: false,
6
- },
7
- rules: {
8
- "no-console": "off",
9
- },
10
- };
@@ -1,27 +0,0 @@
1
- module.exports = {
2
- overrides: [
3
- {
4
- files: ["*.js", "*.jsx"],
5
- extends: ["airbnb", "airbnb/hooks", "../configs/airbnb-mod", "prettier", "../configs/env"],
6
- },
7
- {
8
- files: ["*.ts", "*.tsx"],
9
- extends: [
10
- "plugin:@typescript-eslint/recommended",
11
- "plugin:@typescript-eslint/recommended-requiring-type-checking",
12
- "airbnb",
13
- "airbnb/hooks",
14
- "airbnb-typescript",
15
- "../configs/airbnb-ts-mod",
16
- "prettier",
17
- "../configs/env",
18
- ],
19
- plugins: ["@typescript-eslint"],
20
- parser: "@typescript-eslint/parser",
21
- rules: {
22
- "react/require-default-props": "off",
23
- "react/prop-types": "off",
24
- },
25
- },
26
- ],
27
- };
@@ -1,25 +0,0 @@
1
- module.exports = {
2
- overrides: [
3
- {
4
- files: ["*.svelte"],
5
- extends: [
6
- "airbnb-base",
7
- "../configs/airbnb-base-mod",
8
- "plugin:svelte/recommended",
9
- "plugin:svelte/prettier",
10
- "prettier",
11
- "../configs/env",
12
- ],
13
- parser: "svelte-eslint-parser",
14
-
15
- parserOptions: {
16
- extraFileExtensions: [".svelte"],
17
- },
18
- rules: {
19
- "no-undef-init": "off",
20
- "no-unused-vars": "off",
21
- "import/no-mutable-exports": "off",
22
- },
23
- },
24
- ],
25
- };
@@ -1,32 +0,0 @@
1
- module.exports = {
2
- overrides: [
3
- {
4
- files: ["*.svelte"],
5
- extends: [
6
- "plugin:@typescript-eslint/recommended",
7
- "plugin:@typescript-eslint/recommended-requiring-type-checking",
8
- "airbnb-base",
9
- "airbnb-typescript/base",
10
- "../configs/airbnb-ts-base-mod",
11
- "plugin:svelte/recommended",
12
- "plugin:svelte/prettier",
13
- "prettier",
14
- "../configs/env",
15
- ],
16
- parser: "svelte-eslint-parser",
17
-
18
- parserOptions: {
19
- parser: "@typescript-eslint/parser",
20
- extraFileExtensions: [".svelte"],
21
- },
22
- rules: {
23
- "no-undef-init": "off",
24
- "no-unused-vars": "off",
25
- "@typescript-eslint/no-unused-vars": "off",
26
- "import/no-mutable-exports": "off",
27
- // import/no-unresolved doesn't work properly in .svelte files, but ts takes care of this
28
- "import/no-unresolved": "off",
29
- },
30
- },
31
- ],
32
- };
package/overrides/ts.js DELETED
@@ -1,23 +0,0 @@
1
- module.exports = {
2
- overrides: [
3
- {
4
- files: ["*.ts"],
5
- extends: [
6
- "plugin:@typescript-eslint/recommended",
7
- "plugin:@typescript-eslint/recommended-requiring-type-checking",
8
- "airbnb-base",
9
- "airbnb-typescript/base",
10
- "../configs/airbnb-ts-base-mod",
11
- "prettier",
12
- "../configs/env",
13
- ],
14
- settings: {
15
- "import/resolver": {
16
- typescript: {}, // this loads <rootdir>/tsconfig.json to eslint
17
- },
18
- },
19
- plugins: ["@typescript-eslint"],
20
- parser: "@typescript-eslint/parser",
21
- },
22
- ],
23
- };
package/playwright.js DELETED
@@ -1,12 +0,0 @@
1
- module.exports = {
2
- overrides: [
3
- {
4
- files: ["playwright.config.{js,ts}", "**/{test,tests}/**/*.{ts,js}"],
5
- extends: ["plugin:playwright/playwright-test"],
6
- rules: {
7
- "import/no-extraneous-dependencies": "off",
8
- "playwright/no-networkidle": "off",
9
- },
10
- },
11
- ],
12
- };
package/react-svelte.js DELETED
@@ -1,6 +0,0 @@
1
- module.exports = {
2
- extends: ["./index", "./overrides/react", "./overrides/sveltets"],
3
- parserOptions: {
4
- extraFileExtensions: [".svelte"],
5
- },
6
- };
package/react.js DELETED
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- extends: ["./index", "./overrides/react"],
3
- };
package/svelte-js.js DELETED
@@ -1,6 +0,0 @@
1
- module.exports = {
2
- extends: ["./index", "./overrides/sveltejs"],
3
- parserOptions: {
4
- extraFileExtensions: [".svelte"],
5
- },
6
- };
package/svelte.js DELETED
@@ -1,6 +0,0 @@
1
- module.exports = {
2
- extends: ["./index", "./overrides/sveltets"],
3
- parserOptions: {
4
- extraFileExtensions: [".svelte"],
5
- },
6
- };
package/vitest.js DELETED
@@ -1,13 +0,0 @@
1
- module.exports = {
2
- overrides: [
3
- {
4
- files: ["**/__tests__/**/*.{js,ts,jsx,tsx}", "**/*.{spec,test}.{js,ts,jsx,tsx}"],
5
- plugins: ["vitest", "testing-library"],
6
- extends: ["plugin:vitest/recommended"],
7
- rules: {
8
- "import/no-extraneous-dependencies": "off",
9
- "@typescript-eslint/unbound-method": "off",
10
- },
11
- },
12
- ],
13
- };