-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(plugin-eslint-e2e): add e2e test for legacy config
- Loading branch information
1 parent
e935280
commit abbd764
Showing
5 changed files
with
176 additions
and
9 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
e2e/plugin-eslint-e2e/mocks/fixtures/legacy-config/.eslintrc.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"root": true, | ||
"ignorePatterns": ["code-pushup.config.ts"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.js"], | ||
"env": { | ||
"node": true | ||
}, | ||
"parserOptions": { | ||
"sourceType": "script" | ||
}, | ||
"rules": { | ||
"no-unused-vars": "error", | ||
"no-console": "warn", | ||
"no-undef": "error" | ||
} | ||
} | ||
] | ||
} |
10 changes: 10 additions & 0 deletions
10
e2e/plugin-eslint-e2e/mocks/fixtures/legacy-config/code-pushup.config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import eslintPlugin from '@code-pushup/eslint-plugin'; | ||
|
||
export default { | ||
plugins: [ | ||
await eslintPlugin({ | ||
eslintrc: '.eslintrc.json', | ||
patterns: ['src/*.js'], | ||
}), | ||
], | ||
}; |
6 changes: 6 additions & 0 deletions
6
e2e/plugin-eslint-e2e/mocks/fixtures/legacy-config/src/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
function unusedFn() { | ||
return '42'; | ||
} | ||
module.exports = function consoleLog() { | ||
console.log('No console.log()!'); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters