eslint-config-iplayer-ts
Version:
eslint config for iPlayer Typescript modules
25 lines (24 loc) • 841 B
JavaScript
module.exports = {
rules: {
// Prevent TypeScript-specific constructs from being erroneously flagged as unused
['no-unused-vars']: 0,
['@typescript-eslint/no-unused-vars']: 2,
// Not needed in TS and causes lots of false positives in interfaces
['no-undef']: 0,
// Camelcasing
camelcase: 0,
'@typescript-eslint/naming-convention': [
'error',
{ "selector": "variableLike", "format": ["camelCase", "UPPER_CASE"] },
{ "selector": "class", "format": ["PascalCase"] }
],
// Strict mode is not valid in TS
['strict']: [2, 'never'],
// Indenting
indent: 0,
'@typescript-eslint/indent': [2, 2, { SwitchCase: 1, VariableDeclarator: 1, MemberExpression: 1 }],
// No array constructor
'no-array-constructor': 0,
'@typescript-eslint/no-array-constructor': 2
}
};