@norriq/eslint-config 1.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/LICENSE +8 -0
- package/README.md +64 -0
- package/nuxt.mjs +30 -0
- package/package.json +29 -0
- package/prettier.mjs +17 -0
- package/typescript.mjs +15 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Copyright (c) 2026 NORRIQ. All rights reserved.
|
|
2
|
+
|
|
3
|
+
This software and associated documentation files (the "Software") are the
|
|
4
|
+
proprietary property of NORRIQ. Unauthorized use, copying, modification,
|
|
5
|
+
distribution, or any other exploitation of the Software, in whole or in part,
|
|
6
|
+
is strictly prohibited without the prior written consent of NORRIQ.
|
|
7
|
+
|
|
8
|
+
For licensing inquiries, contact: info@norriq.com
|
package/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# @norriq/eslint-config
|
|
2
|
+
|
|
3
|
+
Shared ESLint flat config presets for NORRIQ projects.
|
|
4
|
+
|
|
5
|
+
## Presets
|
|
6
|
+
|
|
7
|
+
### Nuxt apps
|
|
8
|
+
|
|
9
|
+
For Nuxt applications with Prettier, Vue Composable plugin, and TypeScript rules.
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
// eslint.config.mjs
|
|
13
|
+
import withNuxt from './.nuxt/eslint.config.mjs'
|
|
14
|
+
import norriqNuxt from '@norriq/eslint-config/nuxt'
|
|
15
|
+
|
|
16
|
+
export default withNuxt(norriqNuxt())
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### TypeScript packages
|
|
20
|
+
|
|
21
|
+
For non-Nuxt TypeScript packages.
|
|
22
|
+
|
|
23
|
+
```js
|
|
24
|
+
// eslint.config.mjs
|
|
25
|
+
import norriqTypescript from '@norriq/eslint-config/typescript'
|
|
26
|
+
|
|
27
|
+
export default norriqTypescript()
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Prettier config
|
|
31
|
+
|
|
32
|
+
Shared Prettier config — importable from any project.
|
|
33
|
+
|
|
34
|
+
```js
|
|
35
|
+
// .prettierrc.mjs
|
|
36
|
+
export { default } from '@norriq/eslint-config/prettier'
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Rules
|
|
40
|
+
|
|
41
|
+
Rules shared across presets:
|
|
42
|
+
|
|
43
|
+
- `@typescript-eslint/no-explicit-any: 'error'`
|
|
44
|
+
|
|
45
|
+
Additional rules in the `nuxt` preset:
|
|
46
|
+
|
|
47
|
+
- `require-await: 'error'`
|
|
48
|
+
- `vue/multi-word-component-names: 'off'`
|
|
49
|
+
- `vue/no-v-html: 'off'`
|
|
50
|
+
- `@typescript-eslint/consistent-type-imports: 'off'`
|
|
51
|
+
- `vue-composable/lifecycle-placement: 'warn'`
|
|
52
|
+
- Prettier integration with `endOfLine: 'auto'`
|
|
53
|
+
|
|
54
|
+
## Prettier defaults
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
semi: false
|
|
58
|
+
singleQuote: true
|
|
59
|
+
tabWidth: 4
|
|
60
|
+
printWidth: 120
|
|
61
|
+
trailingComma: 'es5'
|
|
62
|
+
htmlWhitespaceSensitivity: 'ignore'
|
|
63
|
+
plugins: ['prettier-plugin-tailwindcss']
|
|
64
|
+
```
|
package/nuxt.mjs
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
|
|
2
|
+
import vueComposable from 'eslint-plugin-vue-composable'
|
|
3
|
+
|
|
4
|
+
export default function norriqNuxt() {
|
|
5
|
+
return [
|
|
6
|
+
eslintPluginPrettierRecommended,
|
|
7
|
+
{
|
|
8
|
+
plugins: {
|
|
9
|
+
'vue-composable': vueComposable,
|
|
10
|
+
},
|
|
11
|
+
rules: {
|
|
12
|
+
'require-await': 2,
|
|
13
|
+
'@typescript-eslint/no-explicit-any': 'error',
|
|
14
|
+
'@typescript-eslint/consistent-type-imports': 'off',
|
|
15
|
+
'vue/multi-word-component-names': 'off',
|
|
16
|
+
'vue/no-v-html': 'off',
|
|
17
|
+
'prettier/prettier': [
|
|
18
|
+
'error',
|
|
19
|
+
{
|
|
20
|
+
endOfLine: 'auto',
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
'vue-composable/lifecycle-placement': 'warn',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
ignores: ['vendor/*'],
|
|
28
|
+
},
|
|
29
|
+
]
|
|
30
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@norriq/eslint-config",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
"./nuxt": "./nuxt.mjs",
|
|
7
|
+
"./typescript": "./typescript.mjs",
|
|
8
|
+
"./prettier": "./prettier.mjs"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"nuxt.mjs",
|
|
12
|
+
"typescript.mjs",
|
|
13
|
+
"prettier.mjs"
|
|
14
|
+
],
|
|
15
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"eslint-config-prettier": "^10.1.8",
|
|
21
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
22
|
+
"eslint-plugin-vue-composable": "^1.0.0",
|
|
23
|
+
"typescript-eslint": "^8.54.0"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"eslint": ">=9.0.0",
|
|
27
|
+
"prettier": ">=3.0.0"
|
|
28
|
+
}
|
|
29
|
+
}
|
package/prettier.mjs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
semi: false,
|
|
3
|
+
singleQuote: true,
|
|
4
|
+
tabWidth: 4,
|
|
5
|
+
printWidth: 120,
|
|
6
|
+
trailingComma: 'es5',
|
|
7
|
+
htmlWhitespaceSensitivity: 'ignore',
|
|
8
|
+
plugins: ['prettier-plugin-tailwindcss'],
|
|
9
|
+
overrides: [
|
|
10
|
+
{
|
|
11
|
+
files: 'package.json',
|
|
12
|
+
options: {
|
|
13
|
+
tabWidth: 2,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
}
|
package/typescript.mjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import tseslint from 'typescript-eslint'
|
|
2
|
+
|
|
3
|
+
export default function norriqTypescript() {
|
|
4
|
+
return [
|
|
5
|
+
...tseslint.configs.recommended,
|
|
6
|
+
{
|
|
7
|
+
rules: {
|
|
8
|
+
'@typescript-eslint/no-explicit-any': 'error',
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
ignores: ['node_modules/', '.nuxt/', 'dist/'],
|
|
13
|
+
},
|
|
14
|
+
]
|
|
15
|
+
}
|