Skip to content

Commit

Permalink
This explains it
Browse files Browse the repository at this point in the history
  • Loading branch information
savetheclocktower committed Aug 15, 2024
1 parent 60d272a commit f708d4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions lib/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,6 @@ async function getESLint (filePath, config, { isDebug, projectPath }) {

async function lint (eslint, filePath, fileContent) {
if (typeof fileContent === 'string') {
let isIgnored = await eslint.isPathIgnored(filePath);
log(`ignored??? ${isIgnored}`);
return eslint.lintText(fileContent, { filePath });
} else {
return eslint.lintFiles([filePath]);
Expand Down
8 changes: 4 additions & 4 deletions spec/linter-eslint-node-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ describe('The eslint provider for Linter', () => {
const tempDir = path.dirname(tempPath);
const editor = await atom.workspace.open(tempPath);
atom.config.set('linter-eslint-node.advanced.disableEslintIgnore', false);
await copyFileToDir(path.join(paths.eslintignoreDir, '.eslintrc.yaml'), tempDir);
await copyFileToDir(path.join(paths.eslintignoreDir, 'eslint.config.js'), tempDir);

let messages = await lint(editor);
Expand All @@ -293,15 +292,16 @@ describe('The eslint provider for Linter', () => {
rimraf.sync(tempDir);
});

it('will do nothing while "enable" option is `false`, but wake if "enable" is set to `true`', async () => {
fit('will do nothing while "enable" option is `false`, but wake if "enable" is set to `true`', async () => {
atom.config.set('linter-eslint-node.enable', false);
const tempPath = await copyFileToTempDir(
path.join(paths.eslintignoreDir, 'ignored.js')
path.join(paths.eslintignoreDir, 'ignored.js'),
'not-ignored.js'
);
const tempDir = path.dirname(tempPath);
const editor = await atom.workspace.open(tempPath);
atom.config.set('linter-eslint-node.advanced.disableEslintIgnore', false);
await copyFileToDir(path.join(paths.eslintignoreDir, '.eslintrc.yaml'), tempDir);
await copyFileToDir(path.join(paths.eslintignoreDir, 'eslint.config.js'), tempDir);

let messages = await lint(editor);
expect(messages).toBeUndefined();
Expand Down

0 comments on commit f708d4d

Please sign in to comment.