@luxass/eslint-config 4.2.10 → 4.2.11

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
@@ -29,7 +29,7 @@ With [`"type": "module"`](https://nodejs.org/api/packages.html#type) in `package
29
29
 
30
30
  ```js
31
31
  // eslint.config.js
32
- import luxass from '@luxass/eslint-config'
32
+ import { luxass } from '@luxass/eslint-config'
33
33
 
34
34
  export default luxass()
35
35
  ```
@@ -38,7 +38,7 @@ With CJS:
38
38
 
39
39
  ```js
40
40
  // eslint.config.js
41
- const luxass = require('@luxass/eslint-config').default
41
+ const { luxass } = require('@luxass/eslint-config')
42
42
 
43
43
  module.exports = luxass()
44
44
  ```
@@ -47,7 +47,7 @@ Combined with legacy config:
47
47
 
48
48
  ```js
49
49
  // eslint.config.js
50
- const luxass = require('@luxass/eslint-config').default
50
+ const { luxass } = require('@luxass/eslint-config')
51
51
  const { FlatCompat } = require('@eslint/eslintrc')
52
52
 
53
53
  const compat = new FlatCompat()
@@ -129,7 +129,7 @@ Normally you would only need to import the `luxass` preset:
129
129
 
130
130
  ```js
131
131
  // eslint.config.js
132
- import luxass from '@luxass/eslint-config'
132
+ import { luxass } from '@luxass/eslint-config'
133
133
 
134
134
  export default luxass()
135
135
  ```
@@ -138,7 +138,7 @@ you can also configure each `config` individually:
138
138
 
139
139
  ```js
140
140
  // eslint.config.js
141
- import luxass from '@luxass/eslint-config'
141
+ import { luxass } from '@luxass/eslint-config'
142
142
 
143
143
  export default luxass({
144
144
  stylistic: true,
@@ -159,7 +159,7 @@ The `luxass` function accepts an arbitrary number of `flat configs` overrides:
159
159
 
160
160
  ```js
161
161
  // eslint.config.js
162
- import luxass from '@luxass/eslint-config'
162
+ import { luxass } from '@luxass/eslint-config'
163
163
 
164
164
  export default luxass({
165
165
  // configuration points for my config
@@ -246,7 +246,7 @@ Certain rules would only be enabled in specific files, for example, `ts/*` rules
246
246
 
247
247
  ```js
248
248
  // eslint.config.js
249
- import luxass from '@luxass/eslint-config'
249
+ import { luxass } from '@luxass/eslint-config'
250
250
 
251
251
  export default luxass(
252
252
  { vue: true, typescript: true },
@@ -270,7 +270,7 @@ We also provided a `overrides` options to make it easier:
270
270
 
271
271
  ```js
272
272
  // eslint.config.js
273
- import luxass from '@luxass/eslint-config'
273
+ import { luxass } from '@luxass/eslint-config'
274
274
 
275
275
  export default luxass({
276
276
  overrides: {
@@ -299,7 +299,7 @@ Use external formatters to format files that ESLint cannot handle yet (`.css`, `
299
299
 
300
300
  ```js
301
301
  // eslint.config.js
302
- import luxass from '@luxass/eslint-config'
302
+ import { luxass } from '@luxass/eslint-config'
303
303
 
304
304
  export default luxass({
305
305
  formatters: {
@@ -340,7 +340,7 @@ To enable React support, need to explicitly turn it on:
340
340
 
341
341
  ```js
342
342
  // eslint.config.js
343
- import luxass from '@luxass/eslint-config'
343
+ import { luxass } from '@luxass/eslint-config'
344
344
 
345
345
  export default luxass({
346
346
  react: true,
@@ -361,7 +361,7 @@ Next.JS also enables React support.
361
361
 
362
362
  ```js
363
363
  // eslint.config.js
364
- import luxass from '@luxass/eslint-config'
364
+ import { luxass } from '@luxass/eslint-config'
365
365
 
366
366
  export default luxass({
367
367
  nextjs: true,
@@ -380,7 +380,7 @@ To enable UnoCSS support, need to explicitly turn it on:
380
380
 
381
381
  ```js
382
382
  // eslint.config.js
383
- import luxass from '@luxass/eslint-config'
383
+ import { luxass } from '@luxass/eslint-config'
384
384
 
385
385
  export default luxass({
386
386
  unocss: true,
@@ -399,7 +399,7 @@ To enable TailwindCSS support, need to explicitly turn it on:
399
399
 
400
400
  ```js
401
401
  // eslint.config.js
402
- import luxass from '@luxass/eslint-config'
402
+ import { luxass } from '@luxass/eslint-config'
403
403
 
404
404
  export default luxass({
405
405
  tailwindcss: true,
@@ -422,7 +422,7 @@ You can optionally enable the [type aware rules](https://typescript-eslint.io/li
422
422
 
423
423
  ```js
424
424
  // eslint.config.js
425
- import luxass from '@luxass/eslint-config'
425
+ import { luxass } from '@luxass/eslint-config'
426
426
 
427
427
  export default luxass({
428
428
  typescript: {
package/dist/index.cjs CHANGED
@@ -1727,7 +1727,11 @@ async function nextjs(options = {}) {
1727
1727
  "@next/next/no-img-element": "off",
1728
1728
  "react/no-unknown-property": ["error", {
1729
1729
  ignore: ["tw"]
1730
- }]
1730
+ }],
1731
+ "react-refresh/only-export-components": [
1732
+ "warn",
1733
+ { allowConstantExport: true }
1734
+ ]
1731
1735
  }
1732
1736
  }
1733
1737
  ];
package/dist/index.js CHANGED
@@ -1635,7 +1635,11 @@ async function nextjs(options = {}) {
1635
1635
  "@next/next/no-img-element": "off",
1636
1636
  "react/no-unknown-property": ["error", {
1637
1637
  ignore: ["tw"]
1638
- }]
1638
+ }],
1639
+ "react-refresh/only-export-components": [
1640
+ "warn",
1641
+ { allowConstantExport: true }
1642
+ ]
1639
1643
  }
1640
1644
  }
1641
1645
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luxass/eslint-config",
3
- "version": "4.2.10",
3
+ "version": "4.2.11",
4
4
  "description": "ESLint config for @luxass",
5
5
  "type": "module",
6
6
  "author": {