mirror of
https://github.com/jellyfin/jellyfin-vue.git
synced 2024-12-04 04:01:26 +00:00
build(eslint): add linting rules for TypeScript and imports
This commit is contained in:
parent
ef97241e6c
commit
17a975a0b1
18
.eslintrc.js
18
.eslintrc.js
@ -5,19 +5,33 @@ module.exports = {
|
||||
node: true
|
||||
},
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'@nuxtjs/eslint-config-typescript',
|
||||
'prettier',
|
||||
'prettier/vue',
|
||||
'plugin:prettier/recommended',
|
||||
'plugin:promise/recommended',
|
||||
'plugin:nuxt/recommended'
|
||||
'plugin:nuxt/recommended',
|
||||
'plugin:import/errors',
|
||||
'plugin:import/warnings',
|
||||
'plugin:import/typescript'
|
||||
],
|
||||
plugins: ['prettier', 'promise'],
|
||||
plugins: ['prettier', 'promise', 'import'],
|
||||
// add your custom rules here
|
||||
rules: {
|
||||
'import/newline-after-import': 'error',
|
||||
'import/order': 'error',
|
||||
'promise/no-nesting': 'error',
|
||||
'promise/no-return-in-finally': 'error',
|
||||
'promise/prefer-await-to-callbacks': 'error',
|
||||
'promise/prefer-await-to-then': 'error'
|
||||
},
|
||||
settings: {
|
||||
'import/resolver': {
|
||||
nuxt: {
|
||||
extensions: ['.js', '.ts', '.vue', '.json']
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -47,6 +47,8 @@
|
||||
"cz-conventional-changelog": "3.3.0",
|
||||
"eslint": "^7.5.0",
|
||||
"eslint-config-prettier": "^6.11.0",
|
||||
"eslint-import-resolver-nuxt": "^1.0.1",
|
||||
"eslint-plugin-import": "^2.22.0",
|
||||
"eslint-plugin-nuxt": "^1.0.0",
|
||||
"eslint-plugin-prettier": "^3.1.4",
|
||||
"eslint-plugin-promise": "^4.2.1",
|
||||
|
19
yarn.lock
19
yarn.lock
@ -4494,6 +4494,13 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9:
|
||||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
debug@^3.1.0:
|
||||
version "3.2.6"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
|
||||
integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==
|
||||
dependencies:
|
||||
ms "^2.1.1"
|
||||
|
||||
debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
|
||||
@ -5012,6 +5019,14 @@ eslint-import-resolver-node@^0.3.3:
|
||||
debug "^2.6.9"
|
||||
resolve "^1.13.1"
|
||||
|
||||
eslint-import-resolver-nuxt@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/eslint-import-resolver-nuxt/-/eslint-import-resolver-nuxt-1.0.1.tgz#dadb6ea404c6260cf46ebe6f5e91787ab6093cf4"
|
||||
integrity sha512-VY44yOhlsdnkJQCU4FrYGygiiMVHIJWaLbKDElG8WlGCuWLZt5zSWrHGLZtT3MVdIsEBY+Kr3OQRNoeA6e75TQ==
|
||||
dependencies:
|
||||
debug "^3.1.0"
|
||||
resolve "^1.7.1"
|
||||
|
||||
eslint-loader@^4.0.2:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.yarnpkg.com/eslint-loader/-/eslint-loader-4.0.2.tgz#386a1e21bcb613b3cf2d252a3b708023ccfb41ec"
|
||||
@ -5039,7 +5054,7 @@ eslint-plugin-es@^3.0.0:
|
||||
eslint-utils "^2.0.0"
|
||||
regexpp "^3.0.0"
|
||||
|
||||
eslint-plugin-import@2.22.0:
|
||||
eslint-plugin-import@2.22.0, eslint-plugin-import@^2.22.0:
|
||||
version "2.22.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.22.0.tgz#92f7736fe1fde3e2de77623c838dd992ff5ffb7e"
|
||||
integrity sha512-66Fpf1Ln6aIS5Gr/55ts19eUuoDhAbZgnr6UxK5hbDx6l/QgQgx61AePq+BV4PP2uXQFClgMVzep5zZ94qqsxg==
|
||||
@ -10543,7 +10558,7 @@ resolve-url@^0.2.1:
|
||||
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
|
||||
integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=
|
||||
|
||||
resolve@^1.1.7, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.2.0, resolve@^1.3.2, resolve@^1.8.1:
|
||||
resolve@^1.1.7, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.2.0, resolve@^1.3.2, resolve@^1.7.1, resolve@^1.8.1:
|
||||
version "1.17.0"
|
||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444"
|
||||
integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==
|
||||
|
Loading…
Reference in New Issue
Block a user