@nitra/eslint-config 3.1.5 → 3.1.7

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 (3) hide show
  1. package/README.md +12 -0
  2. package/index.js +42 -42
  3. package/package.json +3 -5
package/README.md CHANGED
@@ -15,6 +15,18 @@ bun add @nitra/eslint-config -D
15
15
 
16
16
  _Це лише спільна конфігурація. Prettier, ESLint та плагіни потрібно встановлювати окремо або вони підтягнуться як залежності._
17
17
 
18
+ ### Єдина версія `eslint-scope` (рекомендовано)
19
+
20
+ Щоб уникнути конфліктів версій `eslint-scope` між ESLint і плагінами (наприклад vue-eslint-parser), додайте **один раз** у кореневий `package.json` проєкту:
21
+
22
+ ```json
23
+ "overrides": {
24
+ "eslint-scope": "^9.1.0"
25
+ }
26
+ ```
27
+
28
+ Після цього виконайте `bun install` (або `npm install`). Override застосується до всього дерева залежностей проєкту.
29
+
18
30
  ## Використання
19
31
 
20
32
  У корені проєкту створіть **`eslint.config.js`** (або `eslint.config.mjs`):
package/index.js CHANGED
@@ -8,7 +8,7 @@ import nodePlugin from 'eslint-plugin-n'
8
8
  import oxlint from 'eslint-plugin-oxlint'
9
9
  // import securityPlugin from 'eslint-plugin-security'
10
10
  import unicornPlugin from 'eslint-plugin-unicorn'
11
- import vuePlugin from 'eslint-plugin-vue'
11
+ // import vuePlugin from 'eslint-plugin-vue'
12
12
  import { configs as ymlConfigs } from 'eslint-plugin-yml'
13
13
  import globals from 'globals'
14
14
  // import configStandard from 'eslint-config-standard'
@@ -25,7 +25,7 @@ const importPluginEcmaLatest = {
25
25
  const all = [
26
26
  {
27
27
  // До дефолтних "**/node_modules/", ".git/" додаємо
28
- ignores: ['.yarn/**', '**/dist/**']
28
+ ignores: ['.yarn/**', '**/dist/**', '**/*.vue']
29
29
  },
30
30
  // Загальні правила для всіх Yaml файлів проекту
31
31
  ...ymlConfigs['flat/prettier'],
@@ -134,48 +134,48 @@ const vueAllVite = [
134
134
  }
135
135
  ]
136
136
 
137
- // Для Vue файлів Vue проектів
137
+ // Для Vue файлів Vue проектів (vue-eslint-parser тимчасово вимкнено, .vue в ignores)
138
138
  // files: ['**/*.vue']
139
139
  const vue = [
140
- ...vuePlugin.configs['flat/recommended'],
141
- {
142
- rules: {
143
- 'vue/no-v-html': 'off',
144
- 'vue/html-indent': 'off',
145
- 'vue/max-attributes-per-line': 'off',
146
- 'vue/html-closing-bracket-newline': 'off',
147
- 'vue/singleline-html-element-content-newline': 'off',
148
- 'vue/multi-word-component-names': 'off',
149
- 'vue/html-self-closing': [
150
- 'error',
151
- {
152
- html: {
153
- void: 'always' // під преттієр https://github.com/prettier/prettier/issues/5641
154
- }
155
- }
156
- ],
157
- // Нітра порядок сортування
158
- 'vue/attributes-order': [
159
- 'error',
160
- {
161
- order: [
162
- 'DEFINITION',
163
- 'LIST_RENDERING',
164
- 'CONDITIONALS',
165
- 'RENDER_MODIFIERS',
166
- 'GLOBAL',
167
- ['UNIQUE', 'SLOT'],
168
- 'TWO_WAY_BINDING',
169
- 'OTHER_DIRECTIVES',
170
- 'EVENTS',
171
- 'OTHER_ATTR',
172
- 'CONTENT'
173
- ],
174
- alphabetical: false
175
- }
176
- ]
177
- }
178
- }
140
+ // ...vuePlugin.configs['flat/recommended'],
141
+ // {
142
+ // rules: {
143
+ // 'vue/no-v-html': 'off',
144
+ // 'vue/html-indent': 'off',
145
+ // 'vue/max-attributes-per-line': 'off',
146
+ // 'vue/html-closing-bracket-newline': 'off',
147
+ // 'vue/singleline-html-element-content-newline': 'off',
148
+ // 'vue/multi-word-component-names': 'off',
149
+ // 'vue/html-self-closing': [
150
+ // 'error',
151
+ // {
152
+ // html: {
153
+ // void: 'always' // під преттієр https://github.com/prettier/prettier/issues/5641
154
+ // }
155
+ // }
156
+ // ],
157
+ // // Нітра порядок сортування
158
+ // 'vue/attributes-order': [
159
+ // 'error',
160
+ // {
161
+ // order: [
162
+ // 'DEFINITION',
163
+ // 'LIST_RENDERING',
164
+ // 'CONDITIONALS',
165
+ // 'RENDER_MODIFIERS',
166
+ // 'GLOBAL',
167
+ // ['UNIQUE', 'SLOT'],
168
+ // 'TWO_WAY_BINDING',
169
+ // 'OTHER_DIRECTIVES',
170
+ // 'EVENTS',
171
+ // 'OTHER_ATTR',
172
+ // 'CONTENT'
173
+ // ],
174
+ // alphabetical: false
175
+ // }
176
+ // ]
177
+ // }
178
+ // }
179
179
  ]
180
180
 
181
181
  const vue2 = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nitra/eslint-config",
3
- "version": "3.1.5",
3
+ "version": "3.1.7",
4
4
  "description": "A Eslint shareable config for projects using 'Vue' and 'Node'",
5
5
  "keywords": [
6
6
  "eslint",
@@ -20,17 +20,15 @@
20
20
  "exports": "./index.js",
21
21
  "dependencies": {
22
22
  "@eslint/js": "^10.0.1",
23
- "eslint": "^10.0.0",
24
23
  "eslint-config-prettier": "^10.1.8",
25
- "eslint-scope": "^9.1.0",
26
24
  "eslint-plugin-import": "^2.32.0",
27
- "eslint-plugin-jsdoc": "^62.5.3",
25
+ "eslint-plugin-jsdoc": "^62.5.4",
28
26
  "eslint-plugin-markdown": "^5.1.0",
29
27
  "eslint-plugin-n": "^17.23.2",
30
28
  "eslint-plugin-oxlint": "^1.43.0",
31
29
  "eslint-plugin-unicorn": "^62.0.0",
32
- "eslint-plugin-vue": "^10.7.0",
33
30
  "eslint-plugin-yml": "^3.1.2",
31
+ "eslint-scope": "^9.1.0",
34
32
  "globals": "^17.3.0"
35
33
  },
36
34
  "engines": {