mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 12:57:28 +00:00
chore: add eslint + prettier
This commit is contained in:
parent
96d0c404b1
commit
20c69a3943
8 changed files with 4097 additions and 6 deletions
3
client-new/.eslintignore
Normal file
3
client-new/.eslintignore
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
dist
|
||||||
|
node_modules
|
||||||
|
*.html
|
||||||
13
client-new/.eslintrc.js
Normal file
13
client-new/.eslintrc.js
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
env: {
|
||||||
|
node: true,
|
||||||
|
},
|
||||||
|
extends: ['plugin:vue/essential', 'eslint:recommended'],
|
||||||
|
parserOptions: {
|
||||||
|
parser: '@babel/eslint-parser',
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
'vue/multi-word-component-names': 'off',
|
||||||
|
},
|
||||||
|
}
|
||||||
3
client-new/.prettierignore
Normal file
3
client-new/.prettierignore
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
dist
|
||||||
|
node_modules
|
||||||
|
src/components/Global/SVGContainer.vue
|
||||||
11
client-new/.prettierrc
Normal file
11
client-new/.prettierrc
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"trailingComma": "es5",
|
||||||
|
"semi": false,
|
||||||
|
"singleQuote": true,
|
||||||
|
"useTabs": false,
|
||||||
|
"quoteProps": "consistent",
|
||||||
|
"bracketSpacing": true,
|
||||||
|
"arrowParens": "always",
|
||||||
|
"printWidth": 100,
|
||||||
|
"endOfLine": "auto"
|
||||||
|
}
|
||||||
14
client-new/babel.config.js
Normal file
14
client-new/babel.config.js
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
module.exports = {
|
||||||
|
presets: ['@babel/preset-env'],
|
||||||
|
plugins: [
|
||||||
|
function () {
|
||||||
|
return {
|
||||||
|
visitor: {
|
||||||
|
MetaProperty(path) {
|
||||||
|
path.replaceWithSourceString('process')
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
4040
client-new/package-lock.json
generated
4040
client-new/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -5,16 +5,24 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"preview": "vite preview --port 8080"
|
"preview": "vite preview --port 8080",
|
||||||
|
"lint": "eslint --ext .js,.ts,.jsx,.tsx,.vue --ignore-path .eslintignore .",
|
||||||
|
"format": "prettier --write \"**/*.{ts,tsx,js,css,vue}\" --ignore-path .prettierignore"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@babel/eslint-parser": "^7.22.15",
|
||||||
|
"@babel/preset-env": "^7.22.20",
|
||||||
"@tailwindcss/custom-forms": "^0.2.1",
|
"@tailwindcss/custom-forms": "^0.2.1",
|
||||||
"@vitejs/plugin-vue2": "^2.2.0",
|
"@vitejs/plugin-vue2": "^2.2.0",
|
||||||
"autoprefixer": "^10.4.15",
|
"autoprefixer": "^10.4.15",
|
||||||
|
"eslint-config-prettier": "^9.0.0",
|
||||||
|
"eslint-plugin-prettier": "^5.0.0",
|
||||||
|
"eslint-plugin-vue": "^9.17.0",
|
||||||
"postcss": "^8.4.30",
|
"postcss": "^8.4.30",
|
||||||
"postcss-import": "^12.0.1",
|
"postcss-import": "^12.0.1",
|
||||||
"tailwindcss": "^1.9.6",
|
"tailwindcss": "^1.9.6",
|
||||||
"vite": "^4.4.5"
|
"vite": "^4.4.5",
|
||||||
|
"vite-plugin-eslint": "^1.8.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.5.0",
|
"axios": "^1.5.0",
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
import path from 'path';
|
import path from 'path'
|
||||||
|
import eslint from 'vite-plugin-eslint'
|
||||||
import vue from '@vitejs/plugin-vue2'
|
import vue from '@vitejs/plugin-vue2'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
esbuild: {
|
esbuild: {
|
||||||
drop: ['console', 'debugger'],
|
drop: ['console', 'debugger'],
|
||||||
},
|
},
|
||||||
plugins: [vue()],
|
plugins: [eslint(), vue()],
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@/': `${path.resolve(__dirname, 'src')}/`,
|
'@/': `${path.resolve(__dirname, 'src')}/`,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue