Skip to content

Commit

Permalink
Fix CI (#29)
Browse files Browse the repository at this point in the history
* Copy over the new config file format in package interaction specs

* Use Node 18 instead of Node 16
  • Loading branch information
savetheclocktower authored Aug 12, 2024
1 parent cc043c9 commit bb5137b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
volta install node@latest
echo "NODE_LATEST=$(volta which node)" >> $GITHUB_ENV
echo "NODE_LATEST_VERSION=$(node --version)" >> $GITHUB_ENV
volta install node@16
volta install node@18
echo "NODE_DEFAULT=$(volta which node)" >> $GITHUB_ENV
echo "NODE_DEFAULT_VERSION=$(node --version)" >> $GITHUB_ENV
- name: Install multiple Node versions (Windows)
Expand All @@ -37,7 +37,7 @@ jobs:
volta install node@latest
echo "NODE_LATEST=$(volta which node)" >> $env:GITHUB_ENV
echo "NODE_LATEST_VERSION=$(node --version)" >> $env:GITHUB_ENV
volta install node@16
volta install node@18
echo "NODE_DEFAULT=$(volta which node)" >> $env:GITHUB_ENV
echo "NODE_DEFAULT_VERSION=$(node --version)" >> $env:GITHUB_ENV
- name: Setup dummy ESLint projects
Expand Down
2 changes: 1 addition & 1 deletion lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ export default {
return null;
}

if (err.type && err.type === 'config-not-found') {
if (err.type === 'config-not-found' || err.messageTemplate === 'config-file-missing') {
if (Config.get('disabling.disableWhenNoEslintConfig')) {
let { filePath, projectPath } = err;
if (projectPath && projectPath.length && filePath.startsWith(projectPath)) {
Expand Down
7 changes: 7 additions & 0 deletions spec/fixtures/ci/package-interaction/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = [
{
rules: {
'no-unused-vars': "error"
}
}
];
1 change: 1 addition & 0 deletions spec/node-bin-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ async function writeProjectConfig (projectPath, config) {
async function copyFilesIntoProject (projectPath) {
let files = [
Path.join(fixtureRoot, '.eslintrc'),
Path.join(fixtureRoot, 'eslint.config.js'),
Path.join(fixtureRoot, 'index.js')
];
for (let file of files) {
Expand Down

0 comments on commit bb5137b

Please sign in to comment.