Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #53 from tobiipro/support-typescript-eslint4.15
Browse files Browse the repository at this point in the history
Support typescript eslint4.15
  • Loading branch information
FredrikJT authored Mar 1, 2021
2 parents ab8e0fc + 35890ce commit f5c1707
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 deletions.
2 changes: 1 addition & 1 deletion configs/typescript-eslint-recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

let _ = require('lodash');
let _basic = require('./basic');
let _recommended = require('@typescript-eslint/eslint-plugin/dist/configs/recommended.json');
let _recommended = require('@typescript-eslint/eslint-plugin/dist/configs/recommended.js');

// see https://github.com/eslint/eslint/issues/12592
_basic = _.cloneDeep(_basic);
Expand Down
33 changes: 28 additions & 5 deletions configs/typescript.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// NOTE that this is an addon config. An eslint plugin needs to be installed manually.

let _pluginName = '@typescript-eslint/eslint-plugin';
let _pluginVsn = '^2.6.0';
let _pluginVsn = '^4.15.0';
let _pluginActualVsn = require(`${_pluginName}/package.json`).version;
let _semver = require('semver');

Expand Down Expand Up @@ -50,16 +50,39 @@ module.exports = {
default: 'array'
}],
'@typescript-eslint/await-thenable': 'off', // tslint:await-promise
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-types': 'off',

'@typescript-eslint/no-type-alias': 'off', // tslint:interface-over-type-literal
'@typescript-eslint/consistent-type-definitions': 'off', // tslint:interface-over-type-literal

'@typescript-eslint/class-name-casing': 'error', // tslint:class-name
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'enumMember',
// eslint-disable-next-line no-null/no-null
format: null // Allow enum members to have names formatted in any way.
},
{
selector: 'interface',
format: ['PascalCase'],
custom: {
regex: '^I[A-Z]',
match: false
}
},
{
selector: 'class',
format: ['PascalCase']
},
{
selector: 'typeParameter',
format: ['PascalCase'],
prefix: ['T']
}
],

'@typescript-eslint/explicit-member-accessibility': 'off', // tslint:member-access
'@typescript-eslint/generic-type-naming': 'error',
'@typescript-eslint/interface-name-prefix': 'error', // tslint:interface-name
'@typescript-eslint/member-ordering': ['error'],

// tslint:no-angle-bracket-type-assertion, tslint: no-object-literal-type-assertion
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"eslint-plugin-firecloud": "git://github.com/tobiipro/eslint-plugin-firecloud.git#semver:~0.1.0",
"eslint-plugin-fp": "^2.3.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsdoc": "^17.0.0",
"eslint-plugin-jsdoc": "^30.7.13",
"eslint-plugin-lodash": "^6.0.0",
"eslint-plugin-no-null": "^1.0.2"
},
Expand All @@ -45,7 +45,7 @@
"eslint-plugin-firecloud": "git://github.com/tobiipro/eslint-plugin-firecloud.git#semver:~0.1.0",
"eslint-plugin-fp": "^2.3.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsdoc": "^17.0.0",
"eslint-plugin-jsdoc": "^30.7.13",
"eslint-plugin-lodash": "^6.0.0",
"eslint-plugin-no-null": "^1.0.2",
"npm-publish-git": "git://github.com/andreineculau/npm-publish-git.git#semver:~0.0.8"
Expand Down

0 comments on commit f5c1707

Please sign in to comment.