@useinsider/eslint-config 1.2.1 → 1.3.0-alpha.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.
@@ -1,29 +0,0 @@
1
- /** @type {import("eslint").Linter.Config} */
2
- module.exports = {
3
- extends: [
4
- require.resolve('../base.cjs'),
5
- 'airbnb-base',
6
- 'plugin:vue/vue3-recommended',
7
- 'plugin:vue-scoped-css/vue3-recommended',
8
- 'plugin:jsdoc/recommended',
9
- 'plugin:@cspell/recommended',
10
- require.resolve('../rules/core.cjs'),
11
- require.resolve('../rules/cspell.cjs'),
12
- require.resolve('../rules/stylistic.cjs'),
13
- require.resolve('../rules/jsdoc.cjs'),
14
- require.resolve('../rules/vue.cjs'),
15
- ],
16
- env: {
17
- browser: true,
18
- es2021: true,
19
- },
20
- parser: 'vue-eslint-parser',
21
- parserOptions: {
22
- ecmaVersion: 'latest',
23
- sourceType: 'module',
24
- ecmaFeatures: {
25
- jsx: true,
26
- },
27
- extraFileExtensions: ['.vue'],
28
- },
29
- };
@@ -1,93 +0,0 @@
1
- # @useinsider/eslint-config/vue3-typescript
2
-
3
- This package provides a comprehensive ESLint configuration tailored for Vue 3
4
- projects, ensuring code quality and consistency. It integrates best practices
5
- from the Vue community and extends various ESLint plugins to cover aspects like
6
- TypeScript support, JSDoc conventions, and scoped CSS in Vue components.
7
-
8
- ## Installation
9
-
10
- Before proceeding, ensure you have ESLint installed in your project.
11
- If not, install it:
12
-
13
- ```bash
14
- pnpm add -E -D eslint
15
- ```
16
-
17
- ```bash
18
- npm install -E -D eslint
19
- ```
20
-
21
- Then, install the ESLint plugins and configurations that our Vue configuration
22
- extends. These are necessary for the configuration to work correctly:
23
-
24
- ```bash
25
- pnpm add -E -D \
26
- eslint-config-airbnb-base \
27
- eslint-config-airbnb-typescript \
28
- eslint-plugin-jsdoc \
29
- @cspell/eslint-plugin \
30
- eslint-plugin-vue \
31
- eslint-plugin-vue-scoped-css \
32
- @vue/eslint-config-typescript \
33
- @typescript-eslint/eslint-plugin \
34
- vue-eslint-parser
35
- ```
36
-
37
- ```bash
38
- npm install -E -D \
39
- eslint-config-airbnb-base \
40
- eslint-config-airbnb-typescript \
41
- eslint-plugin-jsdoc \
42
- @cspell/eslint-plugin \
43
- eslint-plugin-vue \
44
- eslint-plugin-vue-scoped-css \
45
- @vue/eslint-config-typescript \
46
- @typescript-eslint/eslint-plugin \
47
- vue-eslint-parser
48
- ```
49
-
50
- ## Usage
51
-
52
- To use this ESLint configuration in your Vue 3 project, update your `.eslintrc`
53
- file as follows:
54
-
55
- ```js
56
- /** @type {import("eslint").Linter.Config} */
57
- module.exports = {
58
- root: true,
59
- overrides: [
60
- {
61
- files: ['./src/**/*.vue'],
62
- extends: [
63
- '@useinsider/eslint-config/vue3-typescript',
64
- ],
65
- parserOptions: {
66
- project: ['./tsconfig.json'],
67
- },
68
- // Add additional configuration settings as needed
69
- },
70
- ],
71
- };
72
- ```
73
-
74
- Remember, you can always override specific rules or add additional plugins as
75
- per your project's requirements.
76
-
77
- ## Reusable config limitation
78
-
79
- Before [ESLint Flat Config] becomes stable, in order to work around a
80
- [known limitation in ESLint], we recommend you to use this package alongside
81
- [@rushstack/eslint-patch], so that you don't have to install too many
82
- dependencies:
83
-
84
- ```bash
85
- pnpm add -E -D @rushstack/eslint-patch
86
- ```
87
- ```bash
88
- npm install -E -D @rushstack/eslint-patch
89
- ```
90
-
91
- [ESLint Flat Config]: https://eslint.org/docs/latest/use/configure/configuration-files-new
92
- [known limitation in ESLint]: https://github.com/eslint/eslint/issues/3458
93
- [@rushstack/eslint-patch]: https://www.npmjs.com/package/@rushstack/eslint-patch
@@ -1,51 +0,0 @@
1
- /** @type {import("eslint").Linter.Config} */
2
- module.exports = {
3
- extends: [
4
- require.resolve('../base.cjs'),
5
- 'airbnb-typescript/base',
6
- 'plugin:vue/vue3-recommended',
7
- 'plugin:vue-scoped-css/vue3-recommended',
8
- 'plugin:jsdoc/recommended',
9
- 'plugin:jsdoc/recommended-typescript-error',
10
- 'plugin:@cspell/recommended',
11
- '@vue/eslint-config-typescript',
12
- 'plugin:@typescript-eslint/recommended',
13
- require.resolve('../rules/core.cjs'),
14
- require.resolve('../rules/cspell.cjs'),
15
- require.resolve('../rules/stylistic.cjs'),
16
- require.resolve('../rules/jsdoc.cjs'),
17
- require.resolve('../rules/vue.cjs'),
18
-
19
- require.resolve('../rules/typescript.cjs'),
20
- ],
21
- plugins: ['@typescript-eslint'],
22
- env: {
23
- browser: true,
24
- },
25
- parser: 'vue-eslint-parser',
26
- parserOptions: {
27
- ecmaVersion: 'latest',
28
- parser: '@typescript-eslint/parser',
29
- sourceType: 'module',
30
- ecmaFeatures: {
31
- jsx: true,
32
- },
33
- extraFileExtensions: ['.vue'],
34
- },
35
- rules: {
36
- 'jsdoc/require-param': 'off',
37
- 'jsdoc/require-jsdoc': 'off',
38
- 'jsdoc/require-returns': 'off',
39
- 'jsdoc/require-param-type': 'off',
40
- 'jsdoc/check-param-names': 'off',
41
- },
42
- settings: {
43
- jsdoc: {
44
- mode: 'typescript',
45
- tagNamePreference: {
46
- callback: 'watch',
47
- desc: 'use',
48
- },
49
- },
50
- },
51
- };