aberlaas-lint 2.24.0 → 2.25.0
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/configs/eslint/index.js +2 -0
- package/configs/eslint/js.js +9 -2
- package/configs/eslint/vue.js +41 -0
- package/lib/js.js +4 -2
- package/package.json +5 -3
package/configs/eslint/index.js
CHANGED
|
@@ -4,11 +4,13 @@ import configJson from './json.js';
|
|
|
4
4
|
import configReact from './react.js';
|
|
5
5
|
import configScripts from './scripts.js';
|
|
6
6
|
import configVitest from './vitest.js';
|
|
7
|
+
import configVue from './vue.js';
|
|
7
8
|
|
|
8
9
|
export default [
|
|
9
10
|
...configJs,
|
|
10
11
|
...configVitest,
|
|
11
12
|
...configReact,
|
|
13
|
+
...configVue,
|
|
12
14
|
...configJson,
|
|
13
15
|
...configScripts,
|
|
14
16
|
...configDocs,
|
package/configs/eslint/js.js
CHANGED
|
@@ -9,7 +9,7 @@ import globals from 'globals';
|
|
|
9
9
|
export default [
|
|
10
10
|
{
|
|
11
11
|
name: 'aberlaas/base',
|
|
12
|
-
files: ['**/*.{js,jsx,ts,tsx}'],
|
|
12
|
+
files: ['**/*.{js,jsx,ts,tsx,vue}'],
|
|
13
13
|
ignores: ['node_modules/*', '.yarn/*'],
|
|
14
14
|
languageOptions: {
|
|
15
15
|
ecmaVersion: 'latest',
|
|
@@ -154,7 +154,14 @@ export default [
|
|
|
154
154
|
'import/no-unresolved': [
|
|
155
155
|
'error',
|
|
156
156
|
{
|
|
157
|
-
ignore: [
|
|
157
|
+
ignore: [
|
|
158
|
+
'changelogen',
|
|
159
|
+
'lint-staged',
|
|
160
|
+
'stylelint',
|
|
161
|
+
'@octokit/rest',
|
|
162
|
+
'@tailwindcss/vite',
|
|
163
|
+
'@vitejs/plugin-vue',
|
|
164
|
+
],
|
|
158
165
|
},
|
|
159
166
|
],
|
|
160
167
|
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { _ } from 'golgoth';
|
|
2
|
+
import pluginVue from 'eslint-plugin-vue';
|
|
3
|
+
|
|
4
|
+
const fullConfig = pluginVue.configs['flat/strongly-recommended'];
|
|
5
|
+
const rules = _.assign({}, ..._.map(fullConfig, 'rules'));
|
|
6
|
+
const languageOptions = _.chain(fullConfig)
|
|
7
|
+
.find({ name: 'vue/base/setup-for-vue' })
|
|
8
|
+
.get('languageOptions')
|
|
9
|
+
.value();
|
|
10
|
+
|
|
11
|
+
export default [
|
|
12
|
+
{
|
|
13
|
+
name: 'aberlaas/vue',
|
|
14
|
+
files: ['**/*.vue'],
|
|
15
|
+
plugins: {
|
|
16
|
+
vue: pluginVue,
|
|
17
|
+
},
|
|
18
|
+
languageOptions,
|
|
19
|
+
processor: 'vue/vue',
|
|
20
|
+
rules: {
|
|
21
|
+
...rules,
|
|
22
|
+
'vue/component-api-style': ['error', ['script-setup']],
|
|
23
|
+
'vue/define-macros-order': ['error'],
|
|
24
|
+
|
|
25
|
+
// Rules that conflict with Pretttier
|
|
26
|
+
'vue/html-indent': ['off'],
|
|
27
|
+
'vue/html-self-closing': [
|
|
28
|
+
'error',
|
|
29
|
+
{
|
|
30
|
+
html: {
|
|
31
|
+
void: 'always', // <img />, <input />
|
|
32
|
+
normal: 'never', // <div></div>
|
|
33
|
+
component: 'any', // <MyComponent /> or <MyComponent></MyComponent>
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
'vue/max-attributes-per-line': ['off'],
|
|
38
|
+
'vue/singleline-html-element-content-newline': ['off'],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
];
|
package/lib/js.js
CHANGED
|
@@ -40,8 +40,10 @@ __ = {
|
|
|
40
40
|
* @returns {Array} Array of files
|
|
41
41
|
*/
|
|
42
42
|
async getInputFiles(userPatterns) {
|
|
43
|
-
const filePatterns = _.isEmpty(userPatterns)
|
|
44
|
-
|
|
43
|
+
const filePatterns = _.isEmpty(userPatterns)
|
|
44
|
+
? ['./**/*.{js,jsx,ts,tsx,vue}']
|
|
45
|
+
: userPatterns;
|
|
46
|
+
const allowedExtensions = ['.js', '.jsx', '.ts', '.tsx', '.vue'];
|
|
45
47
|
|
|
46
48
|
return await findHostPackageFiles(filePatterns, allowedExtensions);
|
|
47
49
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aberlaas-lint",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.25.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "aberlaas lint command: Lint files",
|
|
6
6
|
"author": "Tim Carry <tim@pixelastic.com>",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"@eslint/json": "1.0.0",
|
|
30
30
|
"@typescript-eslint/utils": "8.55.0",
|
|
31
31
|
"@vitest/eslint-plugin": "1.6.7",
|
|
32
|
-
"aberlaas-helper": "2.
|
|
33
|
-
"aberlaas-versions": "2.
|
|
32
|
+
"aberlaas-helper": "2.25.0",
|
|
33
|
+
"aberlaas-versions": "2.25.0",
|
|
34
34
|
"ci-info": "4.4.0",
|
|
35
35
|
"eslint": "9.39.2",
|
|
36
36
|
"eslint-config-prettier": "10.1.8",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"eslint-plugin-package-json": "0.88.2",
|
|
41
41
|
"eslint-plugin-prettier": "5.5.5",
|
|
42
42
|
"eslint-plugin-react": "7.37.5",
|
|
43
|
+
"eslint-plugin-vue": "10.8.0",
|
|
43
44
|
"firost": "5.6.1",
|
|
44
45
|
"globals": "17.3.0",
|
|
45
46
|
"golgoth": "3.1.0",
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
"prettier": "3.8.1",
|
|
48
49
|
"stylelint": "17.2.0",
|
|
49
50
|
"typescript": "5.9.3",
|
|
51
|
+
"vue-eslint-parser": "10.4.0",
|
|
50
52
|
"yaml-lint": "1.7.0"
|
|
51
53
|
},
|
|
52
54
|
"scripts": {
|