vue-linters-config 0.3.4 → 0.3.6

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
@@ -1,4 +1,4 @@
1
- # Конфиги eslint flat, stylelint, prettier
1
+ # Конфиги eslint, stylelint, prettier
2
2
 
3
3
  [npm](https://www.npmjs.com/package/vue-linters-config)
4
4
 
@@ -14,7 +14,7 @@ _Легко принимать свободу как должное, если н
14
14
 
15
15
  Установка сторонних зависимостей:
16
16
 
17
- `npm i eslint eslint-config-prettier eslint-import-resolver-typescript postcss-html prettier stylelint stylelint-config-recess-order stylelint-config-recommended-scss stylelint-config-recommended-vue stylelint-prettier --save-dev`
17
+ `npm i eslint @eslint/js typescript-eslint eslint-plugin-vue vue-eslint-parser eslint-plugin-import-x eslint-plugin-prettier globals eslint-config-prettier eslint-import-resolver-typescript postcss-html prettier stylelint stylelint-config-recess-order stylelint-config-recommended-scss stylelint-config-recommended-vue stylelint-prettier --save-dev`
18
18
 
19
19
  В package.json добавить команду в секцию script для запуска npm run lint:
20
20
 
@@ -27,20 +27,63 @@ _Легко принимать свободу как должное, если н
27
27
  eslint.config.js:
28
28
 
29
29
  ```
30
- import { eslint } from "vue-linters-config";
31
- module.exports = eslint;
30
+ import js from '@eslint/js';
31
+ import tseslint from 'typescript-eslint';
32
+ import pluginVue from 'eslint-plugin-vue';
33
+ import vueParser from 'vue-eslint-parser';
34
+ import eslintPluginImportX from 'eslint-plugin-import-x';
35
+ import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
36
+ import globals from 'globals';
37
+ import { ignores, settings, rules } from 'vue-linters-config';
38
+
39
+ export default tseslint.config(
40
+ js.configs.recommended,
41
+ ...tseslint.configs.recommended,
42
+ ...pluginVue.configs['flat/strongly-recommended'],
43
+ eslintPluginImportX.flatConfigs.recommended,
44
+ eslintPluginImportX.flatConfigs.typescript,
45
+
46
+ ignores,
47
+
48
+ {
49
+ files: ['**/*.{ts,tsx,vue}'],
50
+ languageOptions: { parser: tseslint.parser },
51
+ },
52
+ {
53
+ files: ['**/*.vue'],
54
+ languageOptions: { parser: vueParser, parserOptions: { parser: tseslint.parser } },
55
+ },
56
+
57
+ {
58
+ languageOptions: {
59
+ ecmaVersion: 2022,
60
+ sourceType: 'module',
61
+ globals: { ...globals.browser, ...globals.node, ymaps: 'writable' },
62
+ },
63
+
64
+ ...settings,
65
+ ...rules,
66
+ },
67
+
68
+ eslintPluginPrettierRecommended
69
+ );
70
+
32
71
  ```
33
72
 
34
73
  prettier.config.js:
35
74
 
36
75
  ```
37
- import { prettier } from "vue-linters-config";
38
- module.exports = prettier;
76
+ import { prettier } from 'vue-linters-config';
77
+
78
+ export default prettier;
79
+
39
80
  ```
40
81
 
41
82
  stylelint.config.js:
42
83
 
43
84
  ```
44
- import { stylelint } from "vue-linters-config";
45
- module.exports = stylelint;
85
+ import { stylelint } from 'vue-linters-config';
86
+
87
+ export default stylelint;
88
+
46
89
  ```
package/dist/index.js CHANGED
@@ -225,7 +225,7 @@ const e = {
225
225
  }
226
226
  ]
227
227
  }
228
- }, { prettier: t } = {
228
+ }, t = {
229
229
  bracketSpacing: !0,
230
230
  jsxSingleQuote: !0,
231
231
  printWidth: 120,
@@ -235,7 +235,7 @@ const e = {
235
235
  trailingComma: "es5",
236
236
  useTabs: !1,
237
237
  bracketSameLine: !1
238
- }, { stylelint: n } = {
238
+ }, n = {
239
239
  plugins: ["stylelint-prettier"],
240
240
  extends: [
241
241
  "stylelint-config-recommended-scss",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-linters-config",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "type": "module",
5
5
  "description": "Vue 3 linters config for eslint, prettier, stylelint",
6
6
  "author": "Aleksandr Dergunov <dergunovs@mail.ru>",