diff --git a/.travis.yml b/.travis.yml index bdf6f64..ce21122 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ sudo: false language: node_js node_js: - - '6' - '8' - '10' install: diff --git a/appveyor.yml b/appveyor.yml index 3dc637e..981e82b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,5 @@ environment: matrix: - - nodejs_version: '6' - nodejs_version: '8' - nodejs_version: '10' diff --git a/index.js b/index.js index efa574f..a5f147d 100644 --- a/index.js +++ b/index.js @@ -202,12 +202,7 @@ module.exports = { // eslint eslint#comma-dangle 'trailing-comma': [ true, { - multiline: { - objects: 'always', - arrays: 'always', - functions: 'never', - typeLiterals: 'ignore', - }, + multiline: 'always', }], // eslint#no-cond-assign diff --git a/package.json b/package.json index 5e1eedb..fa06a68 100644 --- a/package.json +++ b/package.json @@ -34,9 +34,9 @@ "homepage": "https://github.com/eggjs/tslint-config-egg", "author": "whxaxes ", "engines": { - "node": ">=6.0.0" + "node": ">=8.0.0" }, "ci": { - "version": "6, 8, 10" + "version": "8, 10" } } diff --git a/test/fixtures/align/parameters.ts b/test/fixtures/align/parameters.ts index 0279005..c134feb 100644 --- a/test/fixtures/align/parameters.ts +++ b/test/fixtures/align/parameters.ts @@ -1,4 +1,4 @@ function bar( a: string, - b: string + b: string, ) {} diff --git a/test/fixtures/comma/trailing-comma-error.ts b/test/fixtures/comma/trailing-comma-error.ts index 660336e..22e4a4e 100644 --- a/test/fixtures/comma/trailing-comma-error.ts +++ b/test/fixtures/comma/trailing-comma-error.ts @@ -3,9 +3,24 @@ export const foo = { b: 2 }; +export const bar = [ + 1, + 2 +]; + function foo2( a: string, - b: string, + b: string ) { console.info(a + b); } + +import { + a, + b +} from 'egg'; + +export { + a, + b +} from 'egg'; diff --git a/test/fixtures/comma/trailing-comma.ts b/test/fixtures/comma/trailing-comma.ts index 91f8bfb..881a9c0 100644 --- a/test/fixtures/comma/trailing-comma.ts +++ b/test/fixtures/comma/trailing-comma.ts @@ -3,9 +3,24 @@ export const foo = { b: 2, }; +export const bar = [ + 1, + 2, +]; + function foo2( a: string, - b: string + b: string, ) { console.info(a + b); } + +import { + a, + b, +} from 'egg'; + +export { + a, + b, +} from 'egg'; diff --git a/test/index.test.js b/test/index.test.js index 8ac4558..d0ed4e7 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -17,7 +17,6 @@ describe('test/index.test.js', () => { return coffee.spawn('tslint', [ path.resolve(cwd, './trailing-comma-error.ts') ]) // .debug() .expect('stdout', /Missing trailing comma/) - .expect('stdout', /Unnecessary trailing comma/) .expect('code', 2) .end(); });