eslint-config-makeable 9.0.0 → 10.0.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/.vscode/settings.json +25 -7
- package/index.mjs +1 -18
- package/package.json +5 -6
- package/scripts/postinstall.js +42 -0
package/.vscode/settings.json
CHANGED
|
@@ -1,11 +1,29 @@
|
|
|
1
1
|
{
|
|
2
|
-
"editor.formatOnSave":
|
|
2
|
+
"editor.formatOnSave": true,
|
|
3
|
+
"editor.defaultFormatter": "biomejs.biome",
|
|
4
|
+
"editor.codeActionsOnSave": {
|
|
5
|
+
"source.fixAll.eslint": "explicit",
|
|
6
|
+
"source.organizeImports.biome": "never"
|
|
7
|
+
},
|
|
3
8
|
"[javascript]": {
|
|
4
|
-
|
|
9
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
5
10
|
},
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
11
|
+
"[typescript]": {
|
|
12
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
13
|
+
},
|
|
14
|
+
"[vue]": {
|
|
15
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
16
|
+
},
|
|
17
|
+
"[json]": {
|
|
18
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
19
|
+
},
|
|
20
|
+
"[jsonc]": {
|
|
21
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
9
22
|
},
|
|
10
|
-
"
|
|
11
|
-
|
|
23
|
+
"eslint.validate": [
|
|
24
|
+
"javascript",
|
|
25
|
+
"typescript",
|
|
26
|
+
"vue"
|
|
27
|
+
],
|
|
28
|
+
"biome.enabled": true
|
|
29
|
+
}
|
package/index.mjs
CHANGED
|
@@ -5,8 +5,6 @@ import globals from 'globals';
|
|
|
5
5
|
import pluginVue from 'eslint-plugin-vue';
|
|
6
6
|
import tseslint from 'typescript-eslint';
|
|
7
7
|
import vueParser from 'vue-eslint-parser';
|
|
8
|
-
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
9
|
-
import eslintPluginPrettier from 'eslint-plugin-prettier';
|
|
10
8
|
|
|
11
9
|
const __filename = fileURLToPath(import.meta.url);
|
|
12
10
|
const __dirname = path.dirname(__filename);
|
|
@@ -22,7 +20,6 @@ const tsTemplateParser = {
|
|
|
22
20
|
export default [
|
|
23
21
|
...compat.extends('airbnb-base'),
|
|
24
22
|
...pluginVue.configs['flat/recommended'],
|
|
25
|
-
eslintConfigPrettier,
|
|
26
23
|
{
|
|
27
24
|
languageOptions: {
|
|
28
25
|
globals: {
|
|
@@ -39,22 +36,7 @@ export default [
|
|
|
39
36
|
sourceType: 'module',
|
|
40
37
|
},
|
|
41
38
|
},
|
|
42
|
-
plugins: {
|
|
43
|
-
prettier: eslintPluginPrettier,
|
|
44
|
-
},
|
|
45
39
|
rules: {
|
|
46
|
-
'prettier/prettier': [
|
|
47
|
-
2,
|
|
48
|
-
{
|
|
49
|
-
trailingComma: 'es5',
|
|
50
|
-
printWidth: 210,
|
|
51
|
-
tabWidth: 4,
|
|
52
|
-
singleQuote: true,
|
|
53
|
-
semi: true,
|
|
54
|
-
bracketSpacing: true,
|
|
55
|
-
arrowParens: 'always',
|
|
56
|
-
},
|
|
57
|
-
],
|
|
58
40
|
'no-console': 0,
|
|
59
41
|
'no-empty': 0,
|
|
60
42
|
indent: 0,
|
|
@@ -78,6 +60,7 @@ export default [
|
|
|
78
60
|
'no-undef': 0,
|
|
79
61
|
'no-void': 0,
|
|
80
62
|
'no-continue': 0,
|
|
63
|
+
'no-promise-executor-return': 0,
|
|
81
64
|
'spaced-comment': 1,
|
|
82
65
|
'no-case-declarations': 1,
|
|
83
66
|
'import/no-extraneous-dependencies': [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-makeable",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"description": "ESlint config for Makeable's Typescript projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"eslint",
|
|
10
10
|
"lint",
|
|
11
11
|
"config",
|
|
12
|
-
"
|
|
12
|
+
"biome"
|
|
13
13
|
],
|
|
14
14
|
"main": "index.mjs",
|
|
15
15
|
"exports": {
|
|
@@ -21,19 +21,18 @@
|
|
|
21
21
|
"@eslint/eslintrc": "^3.3.1",
|
|
22
22
|
"eslint": "^9.39.1",
|
|
23
23
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
24
|
-
"eslint-config-prettier": "^10.1.8",
|
|
25
24
|
"eslint-plugin-import": "^2.32.0",
|
|
26
|
-
"eslint-plugin-prettier": "^5.5.4",
|
|
27
25
|
"eslint-plugin-vue": "^10.6.2",
|
|
28
26
|
"globals": "^16.2.0",
|
|
29
|
-
"prettier": "^3.7.4",
|
|
30
27
|
"typescript-eslint": "^8.33.1",
|
|
31
|
-
"vue-eslint-parser": "^10.2.0"
|
|
28
|
+
"vue-eslint-parser": "^10.2.0",
|
|
29
|
+
"@biomejs/biome": "^2.3.11"
|
|
32
30
|
},
|
|
33
31
|
"peerDependencies": {
|
|
34
32
|
"typescript": "*"
|
|
35
33
|
},
|
|
36
34
|
"scripts": {
|
|
35
|
+
"postinstall": "node scripts/postinstall.js",
|
|
37
36
|
"lint": "eslint src/",
|
|
38
37
|
"lint:fix": "eslint --fix src/"
|
|
39
38
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { existsSync, writeFileSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { resolve, dirname } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
|
|
5
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
|
|
7
|
+
const projectRoot = resolve(__dirname, '..', '..', '..');
|
|
8
|
+
const biomePath = resolve(projectRoot, 'biome.json');
|
|
9
|
+
|
|
10
|
+
// Your shared config
|
|
11
|
+
const biomeConfig = {
|
|
12
|
+
$schema: 'https://biomejs.dev/schemas/1.9.4/schema.json',
|
|
13
|
+
organizeImports: { enabled: false },
|
|
14
|
+
formatter: {
|
|
15
|
+
enabled: true,
|
|
16
|
+
indentStyle: 'space',
|
|
17
|
+
indentWidth: 4,
|
|
18
|
+
lineWidth: 210,
|
|
19
|
+
lineEnding: 'lf',
|
|
20
|
+
},
|
|
21
|
+
javascript: {
|
|
22
|
+
formatter: {
|
|
23
|
+
quoteStyle: 'single',
|
|
24
|
+
jsxQuoteStyle: 'double',
|
|
25
|
+
trailingCommas: 'es5',
|
|
26
|
+
semicolons: 'always',
|
|
27
|
+
arrowParentheses: 'always',
|
|
28
|
+
bracketSpacing: true,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
json: { formatter: { trailingCommas: 'none' } },
|
|
32
|
+
linter: { enabled: false },
|
|
33
|
+
files: { ignore: ['node_modules', 'dist', 'build', '.nuxt', '.output'] },
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// Only create if it doesn't exist (don't overwrite user customizations)
|
|
37
|
+
if (!existsSync(biomePath)) {
|
|
38
|
+
writeFileSync(biomePath, JSON.stringify(biomeConfig, null, 2) + '\n');
|
|
39
|
+
console.log('✓ Created biome.json with shared config');
|
|
40
|
+
} else {
|
|
41
|
+
console.log('ℹ biome.json already exists, skipping');
|
|
42
|
+
}
|