Skip to content

Commit

Permalink
chore(eslint): update config to support TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
mgermerie authored and Desplandis committed Oct 3, 2024
1 parent 8830d6d commit 0d6b611
Show file tree
Hide file tree
Showing 3 changed files with 440 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module.exports = {

// Global ESLint settings
root: true,
extends: [
'eslint-config-airbnb-base',
Expand Down Expand Up @@ -89,6 +91,15 @@ module.exports = {
'no-multi-spaces': 'off',
'import/no-cycle': 'off',
'import/no-useless-path-segments': 'off',
'import/extensions': [
'error',
'ignorePackages',
{
'js': 'never',
'ts': 'never',
'tsx': 'never',
},
],
camelcase: 'off',
'switch-colon-spacing': 'off',
'lines-between-class-members': 'off',
Expand All @@ -109,4 +120,26 @@ module.exports = {
globals: {
__DEBUG__: false,
},

// ESLint settings for .ts files
overrides: [
{
files: ['**/*.ts'],
parser: '@typescript-eslint/parser',
plugins: [
'@stylistic',
'@typescript-eslint',
'eslint-plugin-tsdoc',
],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
'@stylistic/max-len': ['warn', 80],
'valid-jsdoc': 'off',
'tsdoc/syntax': 'warn',
},
},
],
};
Loading

0 comments on commit 0d6b611

Please sign in to comment.