Add eslint and stylelint
This commit is contained in:
parent
1ede2a19f4
commit
eede2f5aff
3 changed files with 32 additions and 2 deletions
|
|
@ -132,7 +132,9 @@
|
|||
"stylelint-rscss": "0.4.0",
|
||||
"stylelint-webpack-plugin": "^3.3.0",
|
||||
"vite": "^6.1.0",
|
||||
"vite-plugin-eslint2": "^5.0.3",
|
||||
"vite-plugin-pwa": "^0.21.1",
|
||||
"vite-plugin-stylelint": "^6.0.0",
|
||||
"vitest": "^3.0.7",
|
||||
"vue-loader": "17.4.2",
|
||||
"vue-style-loader": "4.1.3",
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import { defineConfig } from 'vite'
|
|||
import vue from '@vitejs/plugin-vue'
|
||||
import vueJsx from '@vitejs/plugin-vue-jsx'
|
||||
import { VitePWA } from 'vite-plugin-pwa'
|
||||
import stylelint from 'vite-plugin-stylelint'
|
||||
import eslint from 'vite-plugin-eslint2'
|
||||
import { devSwPlugin, buildSwPlugin, swMessagesPlugin } from './build/sw_plugin.js'
|
||||
import copyPlugin from './build/copy_plugin.js'
|
||||
import { getCommitHash } from './build/commit_hash.js'
|
||||
|
|
@ -107,6 +109,16 @@ export default defineConfig(async ({ mode, command }) => {
|
|||
copyPlugin({
|
||||
inUrl: '/static/ruffle',
|
||||
inFs: resolve(projectRoot, 'node_modules/@ruffle-rs/ruffle')
|
||||
}),
|
||||
eslint({
|
||||
lintInWorker: true,
|
||||
lintOnStart: true,
|
||||
cacheLocation: resolve(projectRoot, 'node_modules/.cache/eslintcache')
|
||||
}),
|
||||
stylelint({
|
||||
lintInWorker: true,
|
||||
lintOnStart: true,
|
||||
cacheLocation: resolve(projectRoot, 'node_modules/.cache/stylelintcache')
|
||||
})
|
||||
],
|
||||
css: {
|
||||
|
|
|
|||
20
yarn.lock
20
yarn.lock
|
|
@ -1822,7 +1822,7 @@
|
|||
estree-walker "^1.0.1"
|
||||
picomatch "^2.2.2"
|
||||
|
||||
"@rollup/pluginutils@^5.0.1":
|
||||
"@rollup/pluginutils@^5.0.1", "@rollup/pluginutils@^5.1.3":
|
||||
version "5.1.4"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.1.4.tgz#bb94f1f9eaaac944da237767cdfee6c5b2262d4a"
|
||||
integrity sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==
|
||||
|
|
@ -3911,7 +3911,7 @@ debug@2.6.9:
|
|||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.5, debug@^4.3.6, debug@^4.4.0:
|
||||
debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.5, debug@^4.3.6, debug@^4.3.7, debug@^4.4.0:
|
||||
version "4.4.0"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a"
|
||||
integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==
|
||||
|
|
@ -10014,6 +10014,14 @@ vite-node@3.0.7:
|
|||
pathe "^2.0.3"
|
||||
vite "^5.0.0 || ^6.0.0"
|
||||
|
||||
vite-plugin-eslint2@^5.0.3:
|
||||
version "5.0.3"
|
||||
resolved "https://registry.yarnpkg.com/vite-plugin-eslint2/-/vite-plugin-eslint2-5.0.3.tgz#677b6563e00b96fdc4f3f2ea49e2e2008430ca52"
|
||||
integrity sha512-kbjjbSyxSYK1oK0kOnSVs2er8DhqNbVA5pNN21SJo8AldQIOgG4LVQvwp6ISYMDXQaaBMOCrmXFTfGkQUjIZ1g==
|
||||
dependencies:
|
||||
"@rollup/pluginutils" "^5.1.3"
|
||||
debug "^4.3.7"
|
||||
|
||||
vite-plugin-pwa@^0.21.1:
|
||||
version "0.21.1"
|
||||
resolved "https://registry.yarnpkg.com/vite-plugin-pwa/-/vite-plugin-pwa-0.21.1.tgz#2fb718ce6c7e62729d51e91bce739232e4a8e792"
|
||||
|
|
@ -10025,6 +10033,14 @@ vite-plugin-pwa@^0.21.1:
|
|||
workbox-build "^7.3.0"
|
||||
workbox-window "^7.3.0"
|
||||
|
||||
vite-plugin-stylelint@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/vite-plugin-stylelint/-/vite-plugin-stylelint-6.0.0.tgz#4d899f4a76f08306ac5148ada47f52d5cf382775"
|
||||
integrity sha512-qXsot4hTkAlR8aXNXhBxF1KWyP78SocCobD1mBwka85l0+nY1Ja4HEyW2x2RbC7kIs6ff9mdUxK9TqcwuxQjxw==
|
||||
dependencies:
|
||||
"@rollup/pluginutils" "^5.1.3"
|
||||
debug "^4.3.7"
|
||||
|
||||
"vite@^5.0.0 || ^6.0.0":
|
||||
version "6.2.0"
|
||||
resolved "https://registry.yarnpkg.com/vite/-/vite-6.2.0.tgz#9dcb543380dab18d8384eb840a76bf30d78633f0"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue