@studio-fes/eslint-config 0.0.0-stage → 0.7.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/index.js +78 -0
- package/package.json +31 -3
- package/README.md +0 -3
package/index.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
import antfu from '@antfu/eslint-config'
|
|
3
|
+
import graphqlPlugin from '@graphql-eslint/eslint-plugin'
|
|
4
|
+
import { globalIgnores } from 'eslint/config'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* studio fes ESLint config: `@antfu/eslint-config` with our defaults, UnoCSS ordering and GraphQL rules.
|
|
8
|
+
* Options are merged into antfu's, extra configs are appended at the end.
|
|
9
|
+
*
|
|
10
|
+
* @param {Parameters<typeof antfu>[0]} [options]
|
|
11
|
+
* @param {...Parameters<typeof antfu>[1]} userConfigs
|
|
12
|
+
*/
|
|
13
|
+
export default function fes(options = {}, ...userConfigs) {
|
|
14
|
+
return antfu(
|
|
15
|
+
{
|
|
16
|
+
formatters: true,
|
|
17
|
+
vue: true,
|
|
18
|
+
unocss: true,
|
|
19
|
+
antislop: true,
|
|
20
|
+
...options,
|
|
21
|
+
},
|
|
22
|
+
globalIgnores([
|
|
23
|
+
'dist',
|
|
24
|
+
'node_modules',
|
|
25
|
+
'.output',
|
|
26
|
+
'.nuxt',
|
|
27
|
+
'.storybook',
|
|
28
|
+
'storybook-static',
|
|
29
|
+
'.github',
|
|
30
|
+
'coverage',
|
|
31
|
+
'*.log',
|
|
32
|
+
'nuxt.d.ts',
|
|
33
|
+
'.DS_Store',
|
|
34
|
+
'.vscode',
|
|
35
|
+
'*.md',
|
|
36
|
+
'package.json',
|
|
37
|
+
'package-lock.json',
|
|
38
|
+
'babel.config.js',
|
|
39
|
+
'graphql',
|
|
40
|
+
'types.ts',
|
|
41
|
+
'generated',
|
|
42
|
+
'components.d.ts',
|
|
43
|
+
'icons.d.ts',
|
|
44
|
+
'auto.d.ts',
|
|
45
|
+
'src-tauri',
|
|
46
|
+
'auto-imports.d.ts',
|
|
47
|
+
'schema.graphql',
|
|
48
|
+
]),
|
|
49
|
+
{
|
|
50
|
+
rules: {
|
|
51
|
+
'unocss/order': 'error',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
files: ['**/*.graphql', '**/*.gql'],
|
|
56
|
+
languageOptions: {
|
|
57
|
+
parser: graphqlPlugin.parser,
|
|
58
|
+
},
|
|
59
|
+
plugins: {
|
|
60
|
+
'@graphql-eslint': graphqlPlugin,
|
|
61
|
+
},
|
|
62
|
+
rules: {
|
|
63
|
+
'@graphql-eslint/no-anonymous-operations': 'error',
|
|
64
|
+
'@graphql-eslint/naming-convention': [
|
|
65
|
+
'error',
|
|
66
|
+
{
|
|
67
|
+
OperationDefinition: {
|
|
68
|
+
style: 'PascalCase',
|
|
69
|
+
forbiddenPrefixes: ['Query', 'Mutation', 'Subscription', 'Get'],
|
|
70
|
+
forbiddenSuffixes: ['Query', 'Mutation', 'Subscription'],
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
...userConfigs,
|
|
77
|
+
)
|
|
78
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studio-fes/eslint-config",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.7.0",
|
|
5
|
+
"description": "Shared ESLint config for studio fes Nuxt projects (antfu + UnoCSS + GraphQL).",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./index.js"
|
|
8
|
+
},
|
|
9
|
+
"main": "./index.js",
|
|
10
|
+
"files": [
|
|
11
|
+
"index.js"
|
|
12
|
+
],
|
|
13
|
+
"peerDependencies": {
|
|
14
|
+
"eslint": "^10.12.0"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@antfu/eslint-config": "^9.5.1",
|
|
18
|
+
"@graphql-eslint/eslint-plugin": "^4.4.1",
|
|
19
|
+
"@unocss/eslint-plugin": "^66.10.5",
|
|
20
|
+
"eslint-plugin-format": "^2.0.1",
|
|
21
|
+
"eslint-plugin-slop": "^0.1.3",
|
|
22
|
+
"eslint-plugin-sonarjs": "^4.2.2"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"eslint": "^10.12.0"
|
|
26
|
+
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/rondodevs/nuxt-layers.git",
|
|
30
|
+
"directory": "packages/eslint-config"
|
|
31
|
+
},
|
|
32
|
+
"author": "studio fes",
|
|
33
|
+
"license": "MIT"
|
|
6
34
|
}
|
package/README.md
DELETED