mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Add prettier to eslint to format vue, js and ts code + add script to run it locally
This commit is contained in:
parent
9d9f062417
commit
610227815a
@ -1,30 +1,35 @@
|
||||
import eslintPluginVue from 'eslint-plugin-vue'
|
||||
import ts from 'typescript-eslint'
|
||||
import eslintPluginVue from "eslint-plugin-vue";
|
||||
import ts from "typescript-eslint";
|
||||
import eslintPluginPrettier from "eslint-plugin-prettier";
|
||||
|
||||
export default ts.config(
|
||||
...ts.configs.recommended,
|
||||
...ts.configs.stylistic,
|
||||
...eslintPluginVue.configs['flat/essential'],
|
||||
{
|
||||
files: ['**/*.vue'],
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
parser: '@typescript-eslint/parser'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
ignores: [
|
||||
'**/vendor/*',
|
||||
'**/import-png.d.ts',
|
||||
'**/chill.webpack.config.js'
|
||||
]
|
||||
},
|
||||
{
|
||||
rules: {
|
||||
// override/add rules settings here, such as:
|
||||
'vue/multi-word-component-names': 'off',
|
||||
'@typescript-eslint/no-require-imports': 'off'
|
||||
}
|
||||
}
|
||||
)
|
||||
...ts.configs.recommended,
|
||||
...ts.configs.stylistic,
|
||||
...eslintPluginVue.configs["flat/essential"],
|
||||
{
|
||||
files: ["**/*.vue"],
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
parser: "@typescript-eslint/parser",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
ignores: [
|
||||
"**/vendor/*",
|
||||
"**/import-png.d.ts",
|
||||
"**/chill.webpack.config.js",
|
||||
],
|
||||
},
|
||||
{
|
||||
plugins: {
|
||||
prettier: eslintPluginPrettier,
|
||||
},
|
||||
rules: {
|
||||
"prettier/prettier": "error",
|
||||
// override/add rules settings here, such as:
|
||||
"vue/multi-word-component-names": "off",
|
||||
"@typescript-eslint/no-require-imports": "off",
|
||||
},
|
||||
},
|
||||
);
|
||||
|
@ -24,6 +24,8 @@
|
||||
"chokidar": "^3.5.1",
|
||||
"dompurify": "^3.1.0",
|
||||
"eslint": "^9.14.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-prettier": "^5.2.1",
|
||||
"eslint-plugin-vue": "^9.30.0",
|
||||
"fork-awesome": "^1.1.7",
|
||||
"jquery": "^3.6.0",
|
||||
@ -31,6 +33,7 @@
|
||||
"node-sass": "^8.0.0",
|
||||
"popper.js": "^1.16.1",
|
||||
"postcss-loader": "^7.0.2",
|
||||
"prettier": "^3.3.3",
|
||||
"raw-loader": "^4.0.2",
|
||||
"sass-loader": "^14.0.0",
|
||||
"select2": "^4.0.13",
|
||||
@ -74,6 +77,7 @@
|
||||
"scripts": {
|
||||
"dev-server": "encore dev-server",
|
||||
"dev": "encore dev",
|
||||
"prettier": "prettier --write \"**/*.{js,ts,vue}\"",
|
||||
"watch": "encore dev --watch",
|
||||
"build": "encore production --progress"
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user