Created
June 27, 2024 18:39
-
-
Save montasim/abe993bc452986486319a3af8138e53c to your computer and use it in GitHub Desktop.
This configuration file sets up linting rules and environments for a JavaScript project. It includes settings for ECMAScript 2020 features, enforces coding styles, and configures plugins for additional linting capabilities.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default { | |
files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'], | |
languageOptions: { | |
ecmaVersion: 2020, // Updated for more ES6+ features | |
sourceType: 'module', | |
globals: { | |
jest: 'readonly', | |
}, | |
}, | |
linterOptions: { | |
reportUnusedDisableDirectives: true, | |
}, | |
plugins: { | |
jest: {}, | |
security: {}, | |
prettier: {}, | |
}, | |
rules: { | |
'no-console': 'warn', | |
'func-names': 'off', | |
'no-underscore-dangle': 'off', | |
'consistent-return': 'off', | |
'jest/expect-expect': 'off', | |
'security/detect-object-injection': 'off', | |
quotes: [ | |
'error', | |
'single', | |
{ avoidEscape: true, allowTemplateLiterals: true }, | |
], | |
semi: ['error', 'always'], | |
'prefer-arrow-callback': ['error', { allowNamedFunctions: false }], | |
'prefer-const': 'error', | |
'arrow-spacing': ['error', { before: true, after: true }], | |
'no-var': 'error', | |
'object-shorthand': ['error', 'always'], | |
'prefer-template': 'error', | |
}, | |
ignores: [ | |
'.idea/**', | |
'node_modules/**', | |
'build/**', | |
'logs/**', | |
'yarn.lock', | |
], | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment