@infinitetoken/eslint-config 0.1.3 → 0.1.4
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 +1 -1
- package/package.json +1 -1
- package/vue.cjs +10 -0
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Shared ESLint (flat config) and Prettier rules for InfiniteToken TypeScript pack
|
|
|
10
10
|
| `@infinitetoken/eslint-config/npm-package` | Any published npm package with no React Native or server specifics (kits, Node plugins) |
|
|
11
11
|
| `@infinitetoken/eslint-config/react-native` | React Native packages; adds `eslint-plugin-react-hooks` and `eslint-plugin-react-native` |
|
|
12
12
|
| `@infinitetoken/eslint-config/server` | Express/server apps; relaxed `no-unused-vars` (`^_` ignore pattern), `no-explicit-any: warn`, skips the `package.json` plugin since these aren't published |
|
|
13
|
-
| `@infinitetoken/eslint-config/vue` | Vue/Nuxt apps; adds `vue-eslint-parser` + `eslint-plugin-vue`'s `flat/recommended`, no type-aware TS parsing (Nuxt's generated tsconfig makes that awkward)
|
|
13
|
+
| `@infinitetoken/eslint-config/vue` | Vue/Nuxt apps; adds `vue-eslint-parser` + `eslint-plugin-vue`'s `flat/recommended`, no type-aware TS parsing (Nuxt's generated tsconfig makes that awkward) |
|
|
14
14
|
| `@infinitetoken/eslint-config/prettier` | The shared Prettier rules object, for the `"prettier"` field in `package.json` |
|
|
15
15
|
|
|
16
16
|
## Usage
|
package/package.json
CHANGED
package/vue.cjs
CHANGED
|
@@ -5,6 +5,7 @@ const tsParser = require('@typescript-eslint/parser')
|
|
|
5
5
|
const tsEslint = require('typescript-eslint')
|
|
6
6
|
const vueParser = require('vue-eslint-parser')
|
|
7
7
|
const pluginVue = require('eslint-plugin-vue')
|
|
8
|
+
const packageJson = require('eslint-plugin-package-json')
|
|
8
9
|
|
|
9
10
|
module.exports = defineConfig([
|
|
10
11
|
{
|
|
@@ -32,6 +33,15 @@ module.exports = defineConfig([
|
|
|
32
33
|
...tsEslint.configs.recommended,
|
|
33
34
|
...pluginVue.configs['flat/recommended'],
|
|
34
35
|
prettierRecommended,
|
|
36
|
+
packageJson.configs.recommended,
|
|
37
|
+
{
|
|
38
|
+
extends: [packageJson.configs.recommended],
|
|
39
|
+
files: ['package.json'],
|
|
40
|
+
rules: {
|
|
41
|
+
'package-json/order-properties': 'warn',
|
|
42
|
+
'package-json/sort-collections': 'warn'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
35
45
|
{
|
|
36
46
|
plugins: {
|
|
37
47
|
'simple-import-sort': simpleImportSort
|