@forthtilliath/eslint-config 0.4.0 → 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,11 +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
- (`no-unused-styles`, `no-single-element-style-arrays`,
116
- `split-platform-components`, `no-raw-text`; `no-inline-styles` and
117
- `sort-styles` stay off — stylistic, not correctness) and the RN/Metro-injected
118
- `__DEV__` global — these aren't behind an option, unlike the toggles above.
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.
119
124
 
120
125
  ```ts
121
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,CA+B5C;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,16 +29,25 @@ export function createReactNativeConfig({ a11y = false, ...options } = {}) {
29
29
  "react-native": pluginReactNative,
30
30
  },
31
31
  rules: {
32
- "react-native/no-unused-styles": "error",
33
- "react-native/no-single-element-style-arrays": "error",
34
- "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>).
35
34
  "react-native/no-raw-text": "error",
36
- // Off by default: both are stylistic preferences rather than
37
- // correctness checks, and inline styles in particular are a common,
38
- // legitimate RN pattern (one-off layout tweaks) that Prettier already
39
- // 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.
40
38
  "react-native/no-inline-styles": "off",
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.
46
+ "react-native/no-unused-styles": "off",
47
+ "react-native/no-single-element-style-arrays": "off",
41
48
  "react-native/sort-styles": "off",
49
+ "react-native/split-platform-components": "off",
50
+ "react-native/no-color-literals": "off",
42
51
  },
43
52
  },
44
53
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forthtilliath/eslint-config",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "publishConfig": {