Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #496 from AtomLinter/greenkeeper/eslint-config-air…
Browse files Browse the repository at this point in the history
…bnb-base-12.0.0

Update eslint-config-airbnb-base to version 12.0.0 🚀
  • Loading branch information
Arcanemagus authored Sep 20, 2017
2 parents 1a931d8 + 3d5405e commit 6408200
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 18 deletions.
9 changes: 5 additions & 4 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ const getVersionString = async (versionPath) => {
getVersionString.cache = new Map();
}
if (!getVersionString.cache.has(versionPath)) {
getVersionString.cache.set(versionPath,
await helpers.exec(versionPath, ['--version']));
getVersionString.cache.set(
versionPath,
await helpers.exec(versionPath, ['--version']),
);
}
return getVersionString.cache.get(versionPath);
};
Expand Down Expand Up @@ -233,8 +235,7 @@ export default {
});
} catch (point) {
// generateRange encountered an invalid point
messages.push(generateInvalidPointTrace(
execPath, match, filePath, textEditor, point));
messages.push(generateInvalidPointTrace(execPath, match, filePath, textEditor, point));
}

match = parseRegex.exec(result);
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@
"fs-plus": "^3.0.0"
},
"devDependencies": {
"eslint": "^4.3.0",
"eslint-config-airbnb-base": "^11.3.1",
"eslint": "^4.6.0",
"eslint-config-airbnb-base": "^12.0.0",
"eslint-plugin-import": "^2.7.0",
"jasmine-fix": "^1.0.1"
},
Expand Down
10 changes: 9 additions & 1 deletion spec/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
module.exports = {
env: {
atomtest: true,
jasmine: true,
atomtest: true
},
rules: {
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true
}
]
}
};
21 changes: 10 additions & 11 deletions spec/linter-flake8-spec.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
'use babel';

import { join } from 'path';
// eslint-disable-next-line import/no-extraneous-dependencies
import { beforeEach, it } from 'jasmine-fix';
// NOTE: If using fit you must add it to the list above!
// eslint-disable-next-line no-unused-vars
import { it, fit, wait, beforeEach, afterEach } from 'jasmine-fix';

const { lint } = require('../lib/main.js').provideLinter();

const fixturePath = join(__dirname, 'fixtures');
const goodPath = join(fixturePath, 'good.py');
Expand All @@ -12,8 +13,6 @@ const errwarnPath = join(fixturePath, 'errwarn.py');
const builtinsPath = join(fixturePath, 'builtins.py');

describe('The flake8 provider for Linter', () => {
const lint = require('../lib/main.js').provideLinter().lint;

beforeEach(async () => {
// Info about this beforeEach() implementation:
// https://github.com/AtomLinter/Meta/issues/15
Expand All @@ -27,12 +26,10 @@ describe('The flake8 provider for Linter', () => {
});

it('should be in the packages list', () =>
expect(atom.packages.isPackageLoaded('linter-flake8')).toBe(true),
);
expect(atom.packages.isPackageLoaded('linter-flake8')).toBe(true));

it('should be an active package', () =>
expect(atom.packages.isPackageActive('linter-flake8')).toBe(true),
);
expect(atom.packages.isPackageActive('linter-flake8')).toBe(true));

describe('checks bad.py and', () => {
let editor = null;
Expand Down Expand Up @@ -164,7 +161,8 @@ describe('The flake8 provider for Linter', () => {
});

it('normalizes executable path', async () => {
atom.config.set('linter-flake8.executablePath',
atom.config.set(
'linter-flake8.executablePath',
join(fixturePath, '..', 'fixtures', 'flake8'),
);
await lint(editor);
Expand All @@ -174,7 +172,8 @@ describe('The flake8 provider for Linter', () => {
it('finds backup executable', async () => {
const flakeNotFound = join('$PROJECT', 'flake8_notfound');
const flakeBackup = join(fixturePath, 'flake8_backup');
atom.config.set('linter-flake8.executablePath',
atom.config.set(
'linter-flake8.executablePath',
`${flakeNotFound};${flakeBackup}`,
);
await lint(editor);
Expand Down

0 comments on commit 6408200

Please sign in to comment.