Skip to content

Commit

Permalink
Evaluate @typescript-eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
voxpelli committed Sep 13, 2022
1 parent 653684f commit 7cc9a6f
Show file tree
Hide file tree
Showing 6 changed files with 913 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "./",
"extends": "./no-tsconfig",
"root": true
}
33 changes: 22 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
'unicorn'
],
'extends': [
'standard',
'./ts-standard',
'plugin:n/recommended',
'plugin:security/recommended',
'plugin:mocha/recommended',
Expand All @@ -26,24 +26,35 @@ module.exports = {
mode: 'typescript'
}
},
overrides: [
{
files: ['*.ts', '*.tsx'],
rules: {
'no-undef': 'off',
},
},
],
rules: {
// Make it "semistandard"
// Make it 'semistandard'

'semi': ['error', 'always'],
'no-extra-semi': 'error',
'@typescript-eslint/semi': ['error', 'always'],
'@typescript-eslint/no-extra-semi': 'error',

// Changed "standard" rules
// Changed 'standard' rules

'comma-dangle': ['warn', {
'@typescript-eslint/comma-dangle': ['warn', {
'arrays': 'ignore',
'objects': 'ignore',
'imports': 'ignore',
'enums': 'ignore',
'exports': 'ignore',
'functions': 'never'
'functions': 'never',
'generics': 'ignore',
'imports': 'ignore',
'objects': 'ignore',
'tuples': 'ignore'
}],
'dot-notation': 'off',
'@typescript-eslint/dot-notation': 'off',
'no-multi-spaces': ['error', { 'ignoreEOLComments': true }],
'no-unused-vars': ['error', {
'@typescript-eslint/no-unused-vars': ['error', {
'vars': 'all',
'args': 'all',
'argsIgnorePattern': '^_',
Expand Down
17 changes: 17 additions & 0 deletions no-tsconfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
'use strict';

module.exports = {
'extends': [
'./'
],
root: true,
parserOptions: {
// eslint-disable-next-line unicorn/no-null
project: null,
},
rules: {
// Skip rules that require a "tsconfig"
'@typescript-eslint/no-implied-eval': 0,
'@typescript-eslint/no-throw-literal': 0,
}
};

0 comments on commit 7cc9a6f

Please sign in to comment.