@forthtilliath/eslint-config 0.4.1 → 0.4.2

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/README.md CHANGED
@@ -111,13 +111,16 @@ export default createBaseConfig({ strict: false, turbo: false });
111
111
  Options are forwarded down the chain, so `createNextJsConfig({ prettier: false })`
112
112
  also disables Prettier in the `reactConfig`/`baseConfig` layers it builds on.
113
113
 
114
- `createReactNativeConfig` also always adds `eslint-plugin-react-native`
115
- (`split-platform-components`, `no-raw-text`) and the RN/Metro-injected
116
- `__DEV__` global — these aren't behind an option, unlike the toggles above.
117
- `no-inline-styles` and `sort-styles` stay off (stylistic, not correctness);
118
- `no-unused-styles` and `no-single-element-style-arrays` also stay off —
119
- `eslint-plugin-react-native@5.0.0` crashes running them under ESLint 10
120
- (`context.getSourceCode is not a function`, an API ESLint 10 removed).
114
+ `createReactNativeConfig` also always adds `eslint-plugin-react-native`'s
115
+ `no-raw-text` rule and the RN/Metro-injected `__DEV__` global — these aren't
116
+ behind an option, unlike the toggles above. Every other rule of the plugin
117
+ stays off: `no-inline-styles`/`sort-styles` are stylistic rather than
118
+ correctness checks, and `no-unused-styles`, `no-single-element-style-arrays`,
119
+ `split-platform-components`, and `no-color-literals` all crash outright under
120
+ ESLint 10 — `eslint-plugin-react-native@5.0.0` still calls
121
+ `context.getSourceCode()`/`context.getFilename()`, APIs ESLint 10 removed.
122
+ `no-raw-text` is the only one that doesn't. Re-enable the others once the
123
+ plugin ships a fix.
121
124
 
122
125
  ```ts
123
126
  // Full i18n project (next-intl, react-intl...): forbid hardcoded JSX strings
@@ -1 +1 @@
1
- {"version":3,"file":"react-native.d.ts","sourceRoot":"","sources":["../src/react-native.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AAEH;;;;iDAIiD;AACjD,+DAFW,OAAO,WAAW,EAAE,iBAAiB,GAAG,OAAO,YAAY,EAAE,kBAAkB,GAC7E,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CAoC5C;AAED;;;;;8CAK8C;AAC9C,gCADU,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CACiB"}
1
+ {"version":3,"file":"react-native.d.ts","sourceRoot":"","sources":["../src/react-native.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AAEH;;;;iDAIiD;AACjD,+DAFW,OAAO,WAAW,EAAE,iBAAiB,GAAG,OAAO,YAAY,EAAE,kBAAkB,GAC7E,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CAwC5C;AAED;;;;;8CAK8C;AAC9C,gCADU,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CACiB"}
@@ -29,21 +29,25 @@ export function createReactNativeConfig({ a11y = false, ...options } = {}) {
29
29
  "react-native": pluginReactNative,
30
30
  },
31
31
  rules: {
32
- "react-native/split-platform-components": "error",
32
+ // The only rule of the plugin that doesn't crash under ESLint 10 (see
33
+ // below) — real, useful signal (raw text outside a <Text>).
33
34
  "react-native/no-raw-text": "error",
34
- // Off by default: both are stylistic preferences rather than
35
- // correctness checks, and inline styles in particular are a common,
36
- // legitimate RN pattern (one-off layout tweaks) that Prettier already
37
- // keeps readable.
35
+ // Off by default: stylistic preference rather than a correctness
36
+ // check, and a common, legitimate RN pattern (one-off layout tweaks)
37
+ // that Prettier already keeps readable.
38
38
  "react-native/no-inline-styles": "off",
39
- // Off: crashes outright under ESLint 10 ("context.getSourceCode is
40
- // not a function") — eslint-plugin-react-native@5.0.0 still calls the
41
- // API ESLint 10 removed, in the util shared by no-unused-styles/
42
- // no-color-literals and in sort-styles/no-single-element-style-arrays
43
- // directly. Re-enable once the plugin ships a fix.
39
+ // Off: every other rule crashes outright under ESLint 10
40
+ // ("context.getSourceCode/getFilename is not a function") —
41
+ // eslint-plugin-react-native@5.0.0 still calls APIs ESLint 10
42
+ // removed, either directly (sort-styles,
43
+ // no-single-element-style-arrays, split-platform-components) or via
44
+ // the util shared with no-unused-styles/no-color-literals. Re-enable
45
+ // each once the plugin ships a fix.
44
46
  "react-native/no-unused-styles": "off",
45
47
  "react-native/no-single-element-style-arrays": "off",
46
48
  "react-native/sort-styles": "off",
49
+ "react-native/split-platform-components": "off",
50
+ "react-native/no-color-literals": "off",
47
51
  },
48
52
  },
49
53
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forthtilliath/eslint-config",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "publishConfig": {