Files
linux-odyssey/.eslintrc.js

86 lines
2.2 KiB
JavaScript

module.exports = {
root: true,
env: {
node: true,
jest: true,
},
plugins: ['@typescript-eslint', 'cypress', 'vue'],
extends: [
'plugin:vue/vue3-essential',
'airbnb-base',
'plugin:prettier/recommended', // We added this
'plugin:cypress/recommended',
],
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
sourceType: 'module',
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
typescript: {},
},
vue: {
version: '3.0', // Explicitly specify Vue 3
},
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
camelcase: ['error', { properties: 'never', ignoreDestructuring: true }],
'no-param-reassign': ['error', { props: false }],
'no-underscore-dangle': ['error', { allow: ['_id'] }],
/* we added this */
'no-var': 'error',
'no-plusplus': 'off',
'prettier/prettier': ['error', { endOfLine: 'auto', semi: false }],
'import/prefer-default-export': 'off',
'no-restricted-syntax': ['off', 'ForOfStatement'],
'lines-between-class-members': [
'error',
'always',
{ exceptAfterSingleLine: true },
],
'no-use-before-define': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
args: 'after-used',
argsIgnorePattern: '^_',
caughtErrors: 'all',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
// Allow missing file extensions
'import/extensions': [
'warn',
'ignorePackages',
{
js: 'off',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
},
overrides: [
{
files: ['**/tests/**/*.js', '**/tests/**/*.ts', '**/*.test.ts'], // Adjust the pattern to match your test files
rules: {
'import/extensions': 'off', // Turn off the rule for test files
'import/no-extraneous-dependencies': 'off',
},
},
],
}