chore: fixing eslint config so we can use some great optional?.chaining?.stuff

This commit is contained in:
blam
2020-05-04 20:54:59 +02:00
parent 1af6cbea8d
commit e3ab861038
4 changed files with 7 additions and 2 deletions
+2
View File
@@ -46,6 +46,8 @@ module.exports = {
bundledDependencies: true,
},
],
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': 'error',
'@typescript-eslint/no-unused-vars': [
'warn',
{ vars: 'all', args: 'after-used', ignoreRestSiblings: true },
+2
View File
@@ -51,6 +51,8 @@ module.exports = {
bundledDependencies: true,
},
],
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': 'error',
'@typescript-eslint/no-unused-vars': [
'warn',
{ vars: 'all', args: 'after-used', ignoreRestSiblings: true },
+2 -1
View File
@@ -1,8 +1,9 @@
module.exports = {
extends: [require.resolve('@backstage/cli/config/eslint')],
extends: [require.resolve('@backstage/cli/config/eslint.backend')],
ignorePatterns: ['sample-templates/'],
rules: {
'no-console': 0, // Permitted in console programs
'new-cap': ['error', { capIsNew: false }], // Because Express constructs things e.g. like 'const r = express.Router()'
},
};
@@ -15,7 +15,7 @@
*/
import { DiskStorage } from './disk';
import * as path from 'path';
import { Logger } from 'winston';
describe('Disk Storage', () => {
it('should load a simple template from a simple directory', async () => {
const testTemplateDir = path.resolve(