mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Unify ESLint configs as well
This commit is contained in:
37
.eslintrc.js
Normal file
37
.eslintrc.js
Normal file
@@ -0,0 +1,37 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
node: true,
|
||||
},
|
||||
extends: [
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
// 'plugin:prettier/recommended'
|
||||
// Uncomment when we are ready to prettify everything
|
||||
],
|
||||
plugins: [
|
||||
'@typescript-eslint',
|
||||
// 'prettier'
|
||||
// Uncomment when we are ready to prettify everything
|
||||
],
|
||||
rules: {
|
||||
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||
'@typescript-eslint/camelcase': 0,
|
||||
'@typescript-eslint/no-use-before-define': 0,
|
||||
'@typescript-eslint/ban-ts-ignore': 0,
|
||||
'@typescript-eslint/no-explicit-any': 0,
|
||||
'comma-dangle': [
|
||||
'error',
|
||||
{
|
||||
arrays: 'always-multiline',
|
||||
exports: 'always-multiline',
|
||||
functions: 'never',
|
||||
imports: 'always-multiline',
|
||||
objects: 'always-multiline',
|
||||
},
|
||||
],
|
||||
},
|
||||
parserOptions: {
|
||||
parser: '@typescript-eslint/parser',
|
||||
},
|
||||
};
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"printWidth": 100,
|
||||
"singleQuote": true,
|
||||
"useTabs": true,
|
||||
"proseWrap": "always"
|
||||
}
|
||||
@@ -1,37 +1,5 @@
|
||||
const parentConfig = require('../.eslintrc.js');
|
||||
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
node: true,
|
||||
},
|
||||
extends: [
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
// 'plugin:prettier/recommended'
|
||||
// Uncomment when we are ready to prettify everything
|
||||
],
|
||||
plugins: [
|
||||
'@typescript-eslint',
|
||||
// 'prettier'
|
||||
// Uncomment when we are ready to prettify everything
|
||||
],
|
||||
rules: {
|
||||
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||
'@typescript-eslint/camelcase': 0,
|
||||
'@typescript-eslint/no-use-before-define': 0,
|
||||
'@typescript-eslint/ban-ts-ignore': 0,
|
||||
'@typescript-eslint/no-explicit-any': 0,
|
||||
'comma-dangle': [
|
||||
'error',
|
||||
{
|
||||
arrays: 'always-multiline',
|
||||
exports: 'always-multiline',
|
||||
functions: 'never',
|
||||
imports: 'always-multiline',
|
||||
objects: 'always-multiline',
|
||||
},
|
||||
],
|
||||
},
|
||||
parserOptions: {
|
||||
parser: '@typescript-eslint/parser',
|
||||
},
|
||||
...parentConfig,
|
||||
};
|
||||
|
||||
3
app/.eslintignore
Normal file
3
app/.eslintignore
Normal file
@@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
dist
|
||||
.eslintrc.js
|
||||
@@ -1,8 +1,8 @@
|
||||
const parentConfig = require('../.eslintrc.js');
|
||||
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
node: true,
|
||||
},
|
||||
...parentConfig,
|
||||
|
||||
extends: [
|
||||
'plugin:vue/essential',
|
||||
'@vue/typescript/recommended',
|
||||
@@ -10,26 +10,8 @@ module.exports = {
|
||||
'@vue/prettier/@typescript-eslint',
|
||||
],
|
||||
rules: {
|
||||
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||
...parentConfig.rules,
|
||||
'prettier/prettier': ['error', { singleQuote: true }],
|
||||
'@typescript-eslint/camelcase': 0,
|
||||
'@typescript-eslint/no-use-before-define': 0,
|
||||
'@typescript-eslint/ban-ts-ignore': 0,
|
||||
'@typescript-eslint/no-explicit-any': 0,
|
||||
'vue/valid-v-slot': 0,
|
||||
'comma-dangle': [
|
||||
'error',
|
||||
{
|
||||
arrays: 'always-multiline',
|
||||
exports: 'always-multiline',
|
||||
functions: 'never',
|
||||
imports: 'always-multiline',
|
||||
objects: 'always-multiline',
|
||||
},
|
||||
],
|
||||
},
|
||||
parserOptions: {
|
||||
parser: '@typescript-eslint/parser',
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user