mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 15:43:51 +00:00
Add prettier to eslint to format vue, js and ts code + add script to run it locally
This commit is contained in:
@@ -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",
|
||||
},
|
||||
},
|
||||
);
|
||||
|
Reference in New Issue
Block a user