@stackrb/eslint-config 0.0.0-stage → 0.1.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 (52) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/LICENSE +21 -0
  3. package/README.md +127 -2
  4. package/dist/configs/base.d.ts +10 -0
  5. package/dist/configs/base.d.ts.map +1 -0
  6. package/dist/configs/base.js +104 -0
  7. package/dist/configs/base.js.map +1 -0
  8. package/dist/configs/languages.d.ts +25 -0
  9. package/dist/configs/languages.d.ts.map +1 -0
  10. package/dist/configs/languages.js +74 -0
  11. package/dist/configs/languages.js.map +1 -0
  12. package/dist/configs/misc.d.ts +18 -0
  13. package/dist/configs/misc.d.ts.map +1 -0
  14. package/dist/configs/misc.js +38 -0
  15. package/dist/configs/misc.js.map +1 -0
  16. package/dist/configs/playwright.d.ts +7 -0
  17. package/dist/configs/playwright.d.ts.map +1 -0
  18. package/dist/configs/playwright.js +15 -0
  19. package/dist/configs/playwright.js.map +1 -0
  20. package/dist/configs/shell.d.ts +7 -0
  21. package/dist/configs/shell.d.ts.map +1 -0
  22. package/dist/configs/shell.js +17 -0
  23. package/dist/configs/shell.js.map +1 -0
  24. package/dist/constants.d.ts +8 -0
  25. package/dist/constants.d.ts.map +1 -0
  26. package/dist/constants.js +17 -0
  27. package/dist/constants.js.map +1 -0
  28. package/dist/index.d.ts +39 -0
  29. package/dist/index.d.ts.map +1 -0
  30. package/dist/index.js +121 -0
  31. package/dist/index.js.map +1 -0
  32. package/dist/targets/mobile.d.ts +12 -0
  33. package/dist/targets/mobile.d.ts.map +1 -0
  34. package/dist/targets/mobile.js +48 -0
  35. package/dist/targets/mobile.js.map +1 -0
  36. package/dist/targets/react.d.ts +7 -0
  37. package/dist/targets/react.d.ts.map +1 -0
  38. package/dist/targets/react.js +25 -0
  39. package/dist/targets/react.js.map +1 -0
  40. package/dist/targets/runtime.d.ts +1293 -0
  41. package/dist/targets/runtime.d.ts.map +1 -0
  42. package/dist/targets/runtime.js +36 -0
  43. package/dist/targets/runtime.js.map +1 -0
  44. package/dist/types.d.ts +44 -0
  45. package/dist/types.d.ts.map +1 -0
  46. package/dist/types.js +2 -0
  47. package/dist/types.js.map +1 -0
  48. package/dist/version.d.ts +2 -0
  49. package/dist/version.d.ts.map +1 -0
  50. package/dist/version.js +2 -0
  51. package/dist/version.js.map +1 -0
  52. package/package.json +105 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/targets/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAQrC,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA4D,CAAC;AAGzF;;;GAGG;AACH,wBAAgB,IAAI,IAAI,MAAM,CAAC,MAAM,EAAE,CAQtC;AAED;;;GAGG;AACH,wBAAgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,CAWzC"}
@@ -0,0 +1,36 @@
1
+ import { defineConfig } from 'eslint/config';
2
+ import globals from 'globals';
3
+ import { CODE_FILES } from '../constants.js';
4
+ // Frozen so a consumer mutating one returned config cannot affect other targets or cached presets.
5
+ export const BROWSER_GLOBALS = Object.freeze({ ...globals.browser, ...globals.builtin });
6
+ const NODE_GLOBALS = Object.freeze({ ...globals.node, ...globals.builtin });
7
+ /**
8
+ * Builds Node.js globals for code files.
9
+ * @returns The Node target config block.
10
+ */
11
+ export function node() {
12
+ return defineConfig({
13
+ files: [CODE_FILES],
14
+ languageOptions: {
15
+ globals: NODE_GLOBALS,
16
+ },
17
+ name: 'stackrb/target-node',
18
+ });
19
+ }
20
+ /**
21
+ * Builds browser globals and disables checks for Node-only builtins.
22
+ * @returns The browser target config block.
23
+ */
24
+ export function browser() {
25
+ return defineConfig({
26
+ files: [CODE_FILES],
27
+ languageOptions: {
28
+ globals: BROWSER_GLOBALS,
29
+ },
30
+ name: 'stackrb/target-browser',
31
+ rules: {
32
+ 'n/no-unsupported-features/node-builtins': 'off',
33
+ },
34
+ });
35
+ }
36
+ //# sourceMappingURL=runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/targets/runtime.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,mGAAmG;AACnG,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;AACzF,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,OAAO,CAAC,IAAI,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;AAE5E;;;GAGG;AACH,MAAM,UAAU,IAAI;IAClB,OAAO,YAAY,CAAC;QAClB,KAAK,EAAE,CAAC,UAAU,CAAC;QACnB,eAAe,EAAE;YACf,OAAO,EAAE,YAAY;SACtB;QACD,IAAI,EAAE,qBAAqB;KAC5B,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,OAAO;IACrB,OAAO,YAAY,CAAC;QAClB,KAAK,EAAE,CAAC,UAAU,CAAC;QACnB,eAAe,EAAE;YACf,OAAO,EAAE,eAAe;SACzB;QACD,IAAI,EAAE,wBAAwB;QAC9B,KAAK,EAAE;YACL,yCAAyC,EAAE,KAAK;SACjD;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type { Linter } from 'eslint';
2
+ export type DeprecationKind = 'function' | 'import' | 'member-expression';
3
+ export interface DeprecationRule {
4
+ readonly kind?: DeprecationKind;
5
+ readonly name: string;
6
+ readonly use?: string;
7
+ }
8
+ export type GlobalValue = 'off' | 'readonly' | 'writable' | boolean;
9
+ export interface Options {
10
+ /**
11
+ Dependency names or patterns that `eslint-plugin-depend` should ban.
12
+ */
13
+ readonly bannedDependencies?: readonly string[];
14
+ /**
15
+ Deprecated symbols that `eslint-plugin-deprecate` should report.
16
+ */
17
+ readonly deprecations?: readonly DeprecationRule[];
18
+ /**
19
+ Additional ambient globals (for example `chrome`, `GM_xmlhttpRequest`).
20
+ */
21
+ readonly extraGlobals?: Readonly<Record<string, GlobalValue>>;
22
+ /**
23
+ Extra patterns added to the global ignore list.
24
+ */
25
+ readonly extraIgnores?: readonly string[];
26
+ /**
27
+ Final rule overrides, applied after every preset including Prettier.
28
+ */
29
+ readonly extraRules?: Linter.RulesRecord;
30
+ /**
31
+ Value for `settings.node.version`; prevents guessing from the consumer's `engines`.
32
+ */
33
+ readonly nodeVersion?: string;
34
+ /**
35
+ Runtime(s) the consuming package targets. Defaults to `node`.
36
+ */
37
+ readonly target?: readonly Target[] | Target;
38
+ /**
39
+ Enable type-aware rules via `parserOptions.projectService`.
40
+ */
41
+ readonly typed?: boolean;
42
+ }
43
+ export type Target = 'browser' | 'expo' | 'native' | 'node' | 'react';
44
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,QAAQ,GAAG,mBAAmB,CAAC;AAE1E,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;AAEpE,MAAM,WAAW,OAAO;IACtB;;MAEE;IACF,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChD;;MAEE;IACF,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IACnD;;MAEE;IACF,QAAQ,CAAC,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;IAC9D;;MAEE;IACF,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C;;MAEE;IACF,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC;IACzC;;MAEE;IACF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;MAEE;IACF,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAAC;IAC7C;;MAEE;IACF,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,MAAM,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC"}
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare const VERSION = "0.1.0";
2
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ export const VERSION = '0.1.0';
2
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,107 @@
1
1
  {
2
2
  "name": "@stackrb/eslint-config",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "One-import ESLint flat config for Node, browser, React, React Native and Expo projects",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "engines": {
8
+ "node": "^20.19.0 || ^22.13.0 || >=24"
9
+ },
10
+ "keywords": [
11
+ "eslint",
12
+ "eslintconfig",
13
+ "flat-config",
14
+ "typescript",
15
+ "react",
16
+ "react-native",
17
+ "expo"
18
+ ],
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "import": "./dist/index.js"
23
+ },
24
+ "./package.json": "./package.json"
25
+ },
26
+ "main": "./dist/index.js",
27
+ "types": "./dist/index.d.ts",
28
+ "files": [
29
+ "dist",
30
+ "README.md",
31
+ "CHANGELOG.md",
32
+ "LICENSE"
33
+ ],
34
+ "sideEffects": false,
35
+ "scripts": {
36
+ "prepack": "npm run build",
37
+ "build": "node scripts/clean-distribution.mjs && tsc -p tsconfig.build.json",
38
+ "typecheck": "tsc --noEmit",
39
+ "test": "npm run build && vitest run test/unit test/integration test/e2e test/memory",
40
+ "test:unit": "vitest run test/unit",
41
+ "test:integration": "npm run build && vitest run test/integration",
42
+ "test:e2e": "npm run build && vitest run test/e2e",
43
+ "test:memory": "vitest run test/memory",
44
+ "test:perf": "vitest bench --run test/performance",
45
+ "lint": "npm run build && eslint .",
46
+ "docs": "npm run build && mdaics && node scripts/clean-api-documents.mjs",
47
+ "docs:check": "npm run docs && git diff --exit-code -- docs/api",
48
+ "knip": "knip",
49
+ "audit": "npm audit --audit-level=high",
50
+ "check": "npm run typecheck && npm run test && npm run lint && npm run knip && mdaics && npm run build",
51
+ "prepare": "husky"
52
+ },
53
+ "peerDependencies": {
54
+ "eslint": ">=10.4.0",
55
+ "typescript": ">=4.8.4 <6.1.0"
56
+ },
57
+ "peerDependenciesMeta": {
58
+ "typescript": {
59
+ "optional": true
60
+ }
61
+ },
62
+ "dependencies": {
63
+ "@deslint/eslint-plugin": "0.10.0",
64
+ "@eslint-community/eslint-plugin-eslint-comments": "4.8.1",
65
+ "@eslint-react/eslint-plugin": "5.30.6",
66
+ "@eslint/js": "10.0.1",
67
+ "@eslint/json": "2.1.1",
68
+ "@eslint/markdown": "9.0.0",
69
+ "@eslint/shell": "0.1.2",
70
+ "@react-native/eslint-plugin": "0.88.1",
71
+ "@stylistic/eslint-plugin": "6.0.1",
72
+ "@typescript-eslint/parser": "8.74.0",
73
+ "@vitest/eslint-plugin": "1.6.28",
74
+ "eslint-config-prettier": "10.1.8",
75
+ "eslint-plugin-de-morgan": "2.3.0",
76
+ "eslint-plugin-depend": "1.5.0",
77
+ "eslint-plugin-deprecate": "0.9.0",
78
+ "eslint-plugin-expo": "1.2.1",
79
+ "eslint-plugin-jsdoc": "65.5.4",
80
+ "eslint-plugin-jsx-a11y": "6.10.2",
81
+ "eslint-plugin-n": "18.5.0",
82
+ "eslint-plugin-perfectionist": "5.14.0",
83
+ "eslint-plugin-playwright": "2.12.2",
84
+ "eslint-plugin-promise": "7.3.0",
85
+ "eslint-plugin-react-hooks": "7.1.1",
86
+ "eslint-plugin-react-native-globals": "0.1.2",
87
+ "eslint-plugin-regexp": "3.3.3",
88
+ "eslint-plugin-security": "4.2.1",
89
+ "eslint-plugin-sonarjs": "4.2.2",
90
+ "eslint-plugin-unicorn": "80.0.0",
91
+ "globals": "17.14.0",
92
+ "typescript-eslint": "8.74.0"
93
+ },
94
+ "devDependencies": {
95
+ "@commitlint/cli": "21.2.4",
96
+ "@commitlint/config-conventional": "21.2.4",
97
+ "@types/node": "^26.6.6",
98
+ "@typescript-eslint/typescript-estree": "8.74.0",
99
+ "eslint": "10.15.0",
100
+ "husky": "9.1.7",
101
+ "knip": "6.48.0",
102
+ "mdaics": "1.0.0",
103
+ "typescript": "6.0.2",
104
+ "vite": "8.3.8",
105
+ "vitest": "5.1.1"
106
+ }
107
+ }