Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix integration test #914

Merged
merged 20 commits into from
Dec 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 15 additions & 2 deletions test/integration/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ module.exports = {
...enableAllRules,

// This rule crashing on replace string inside `jsx` or `Unicode escape sequence`
'unicorn/string-content': 'off'
}
'unicorn/string-content': 'off',

// #922 will fix it
'unicorn/error-message': 'off'
},
overrides: [
{
files: ['*.ts'],
parser: '@typescript-eslint/parser'
},
{
files: ['*.vue'],
parser: 'vue-eslint-parser'
}
]
};
80 changes: 50 additions & 30 deletions test/integration/projects.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
'use strict';
const path = require('path');

const typescriptArguments = ['--parser', '@typescript-eslint/parser', '--ext', '.ts,.js'];
const vueArguments = ['--parser', 'vue-eslint-parser', '--ext', '.vue,.js'];

module.exports = [
{
name: 'unicorn',
Expand Down Expand Up @@ -45,57 +42,64 @@ module.exports = [
'https://github.com/sindresorhus/meow',
'https://github.com/sindresorhus/globby',
'https://github.com/sindresorhus/emittery',
{
repository: 'https://github.com/sindresorhus/p-queue',
extraArguments: typescriptArguments
},
'https://github.com/sindresorhus/p-queue',
'https://github.com/sindresorhus/pretty-bytes',
'https://github.com/sindresorhus/normalize-url',
{
repository: 'https://github.com/sindresorhus/pageres',
extraArguments: typescriptArguments
},
'https://github.com/sindresorhus/pageres',
{
repository: 'https://github.com/sindresorhus/got',
extraArguments: typescriptArguments
extraArguments: [
'--ignore-pattern',
'documentation/examples/gh-got.js' // This file use `package` keyword as variable
]
},
'https://github.com/eslint/eslint',
'https://github.com/prettier/prettier',
{
repository: 'https://github.com/prettier/prettier',
extraArguments: [
'--ignore-pattern',
'tests/**'
]
},
'https://github.com/facebook/react',
{
repository: 'https://github.com/angular/angular',
extraArguments: [
...typescriptArguments,

'--ignore-pattern',
'aio/content/examples/animations/src/app/open-close.component.3.ts',
'--ignore-pattern',
'aio/content/examples/router/src/app/app-routing.module.9.ts',

'--ignore-pattern',
'aio/tools/transforms/templates/data-module.template.js',
'--ignore-pattern',
'aio/tools/transforms/authors-package/index.js', // This file use `package` keyword as variable

'--ignore-pattern',
'aio/content/examples/router/src/app/app-routing.module.9.ts',
'packages/compiler-cli/test/**',

'--ignore-pattern',
'packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/elements/**'
'tools/**'
]
},
{
repository: 'https://github.com/microsoft/typescript',
extraArguments: typescriptArguments
extraArguments: [
// These file use `'\033'`
'--ignore-pattern',
'build/**'
]
},
{
repository: 'https://github.com/microsoft/vscode',
extraArguments: typescriptArguments
},
{
repository: 'https://github.com/ElemeFE/element',
extraArguments: vueArguments
},
{
repository: 'https://github.com/iview/iview',
extraArguments: vueArguments
extraArguments: [
// This file use `'\033'`
'--ignore-pattern',
'build/**'
]
},
'https://github.com/ElemeFE/element',
'https://github.com/iview/iview',
'https://github.com/sindresorhus/create-dmg',
'https://github.com/sindresorhus/cp-file',
'https://github.com/sindresorhus/capture-website',
Expand All @@ -119,8 +123,6 @@ module.exports = [
{
repository: 'https://github.com/vercel/next.js',
extraArguments: [
...typescriptArguments,

'--ignore-pattern',
'examples/**',

Expand All @@ -138,7 +140,25 @@ module.exports = [
},
'https://github.com/ReactTraining/react-router',
'https://github.com/facebook/relay',
'https://github.com/mozilla/pdf.js'
'https://github.com/mozilla/pdf.js',
// #912
{
repository: 'https://github.com/microsoft/fluentui',
extraArguments: [
'--ignore-pattern',
'scripts/publish-beta.js' // This file use `package` keyword as variable
]
},
// #902
{
repository: 'https://github.com/reakit/reakit',
extraArguments: [
'--ignore-pattern',
'packages/reakit/jest.config.js' // This file use `package` keyword as variable
]
},
// #903
'https://github.com/mattermost/mattermost-webapp'
].map(project => {
if (typeof project === 'string') {
project = {repository: project};
Expand Down
7 changes: 7 additions & 0 deletions test/integration/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ const makeEslintTask = (project, destination) => {
'eslint',
'--fix-dry-run',
'--no-eslintrc',
'--ext',
'.js,.ts,.vue',
'--format',
'json',
'--config',
Expand Down Expand Up @@ -168,5 +170,10 @@ list.run()
console.error(error);
}

process.exit(1);
})
// Catch errors in last `.catch`
.catch(error => {
console.error(error);
process.exit(1);
});