Skip to content

Commit

Permalink
SCRIPT, INSTALL, LINT, TEST FIX
Browse files Browse the repository at this point in the history
  • Loading branch information
cnotv committed Aug 12, 2024
1 parent 40421ba commit 9122c95
Show file tree
Hide file tree
Showing 550 changed files with 5,648 additions and 7,077 deletions.
255 changes: 162 additions & 93 deletions .eslintrc.default.js
Original file line number Diff line number Diff line change
@@ -1,107 +1,175 @@
module.exports = {
// root: true,
env: {
browser: true,
node: true
},
globals: { NodeJS: true, Timer: true },
plugins: ['jest', '@typescript-eslint'],
globals: {
NodeJS: true,
Timer: true
},
plugins: [
'jest',
'@typescript-eslint'
],
extends: [
'standard',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'@vue/standard',
'@vue/typescript/recommended',
'plugin:vue/recommended',
'plugin:cypress/recommended',
'plugin:vue/vue3-recommended',
'plugin:cypress/recommended'
],
rules: {

// Styling
'semi-spacing': 'off',
'space-in-parens': 'off',
'array-bracket-spacing': 'warn',
'arrow-parens': 'warn',
'arrow-spacing': ['warn', { before: true, after: true }],
'block-spacing': ['warn', 'always'],
'brace-style': ['warn', '1tbs'],
'comma-dangle': ['warn', 'only-multiline'],
'comma-spacing': 'warn',
indent: ['warn', 2],
'keyword-spacing': 'warn',
'newline-per-chained-call': ['warn', { ignoreChainWithDepth: 4 }],
'no-trailing-spaces': 'warn',
'func-call-spacing': ['warn', 'never'],
'wrap-iife': 'off',
'lines-between-class-members': ['warn', 'always', { exceptAfterSingleLine: true }],
'multiline-ternary': ['warn', 'never'],
'semi-spacing': 'off',
'space-in-parens': 'off',
'array-bracket-spacing': 'warn',
'arrow-parens': 'warn',
'arrow-spacing': [
'warn',
{
before: true,
after: true
}
],
'block-spacing': [
'warn',
'always'
],
'brace-style': [
'warn',
'1tbs'
],
'comma-dangle': [
'warn',
'only-multiline'
],
'comma-spacing': 'warn',
indent: [
'warn',
2
],
'keyword-spacing': 'warn',
'newline-per-chained-call': [
'warn',
{ ignoreChainWithDepth: 4 }
],
'no-trailing-spaces': 'warn',
'func-call-spacing': [
'warn',
'never'
],
'wrap-iife': 'off',
'lines-between-class-members': [
'warn',
'always',
{ exceptAfterSingleLine: true }
],
'multiline-ternary': [
'warn',
'never'
],
'no-whitespace-before-property': 'warn',
'object-curly-spacing': ['warn', 'always'],
'object-property-newline': 'warn',
'object-shorthand': 'warn',
'padded-blocks': ['warn', 'never'],
'quote-props': 'warn',
'rest-spread-spacing': 'warn',
semi: ['warn', 'always'],
'space-before-function-paren': ['warn', 'never'],
'space-infix-ops': 'warn',
'spaced-comment': 'warn',
'switch-colon-spacing': 'warn',
'template-curly-spacing': ['warn', 'always'],
'yield-star-spacing': ['warn', 'both'],
'key-spacing': ['warn', {
align: {
beforeColon: false,
afterColon: true,
on: 'value',
mode: 'strict'
},
multiLine: {
beforeColon: false,
afterColon: true
},
}],

'object-curly-newline': ['warn', {
ObjectExpression: {
multiline: true,
minProperties: 3
},
ObjectPattern: {
multiline: true,
minProperties: 4
},
ImportDeclaration: {
multiline: true,
minProperties: 5
},
ExportDeclaration: {
multiline: true,
minProperties: 3
'object-curly-spacing': [
'warn',
'always'
],
'object-property-newline': 'warn',
'object-shorthand': 'warn',
'padded-blocks': [
'warn',
'never'
],
'quote-props': 'warn',
'rest-spread-spacing': 'warn',
semi: [
'warn',
'always'
],
'space-before-function-paren': [
'warn',
'never'
],
'space-infix-ops': 'warn',
'spaced-comment': 'warn',
'switch-colon-spacing': 'warn',
'template-curly-spacing': [
'warn',
'always'
],
'yield-star-spacing': [
'warn',
'both'
],
'key-spacing': [
'warn',
{
align: {
beforeColon: false,
afterColon: true,
on: 'value',
mode: 'strict'
},
multiLine: {
beforeColon: false,
afterColon: true
}
}
],
'object-curly-newline': [
'warn',
{
ObjectExpression: {
multiline: true,
minProperties: 3
},
ObjectPattern: {
multiline: true,
minProperties: 4
},
ImportDeclaration: {
multiline: true,
minProperties: 5
},
ExportDeclaration: {
multiline: true,
minProperties: 3
}
}
}],
],
'padding-line-between-statements': [
'warn',
{
blankLine: 'always',
prev: '*',
next: 'return',
next: 'return'
},
{
blankLine: 'always',
prev: 'function',
next: 'function',
next: 'function'
},
// This configuration would require blank lines after every sequence of variable declarations
{
blankLine: 'always',
prev: ['const', 'let', 'var'],
next: '*'
prev: [
'const',
'let',
'var'
],
next: '*'
},
{
blankLine: 'any',
prev: ['const', 'let', 'var'],
next: ['const', 'let', 'var']
prev: [
'const',
'let',
'var'
],
next: [
'const',
'let',
'var'
]
}
],
quotes: [
Expand All @@ -110,28 +178,30 @@ module.exports = {
{
avoidEscape: true,
allowTemplateLiterals: true
},
}
],
'space-unary-ops': [
'warn',
{
words: true,
nonwords: false,
nonwords: false
}
],
'vue/one-component-per-file': 'off',
'vue/no-deprecated-slot-attribute': 'off',
'vue/require-explicit-emits': 'off',
'vue/v-on-event-hyphenation': 'off'
},
overrides: [
// TS Exceptions
{
files: ['**/*.{js,ts,vue}'],
files: [
'**/*.{js,ts,vue}'
],
rules: {
// Errors
'@typescript-eslint/no-empty-function': 'off', // Opinionated?
'@typescript-eslint/ban-types': 'off', // This does not seems to work well with Vue2
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/ban-types': 'off'
}
},

// Tests exceptions due mocks
{
files: [
'**/*.test.{js,ts}',
Expand All @@ -142,18 +212,17 @@ module.exports = {
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'jest/prefer-expect-assertions': 'off',
'jest/prefer-expect-assertions': 'off'
},
extends: ['plugin:jest/all']
extends: [
'plugin:jest/all'
]
},

// bug?
{
files: ['**/*.{js,vue}'],
rules: {
// Warnings
'@typescript-eslint/explicit-module-boundary-types': 'off',
}
},
files: [
'**/*.{js,vue}'
],
rules: { '@typescript-eslint/explicit-module-boundary-types': 'off' }
}
]
};
Loading

0 comments on commit 9122c95

Please sign in to comment.