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

Commit c9f20d3

Browse files
authored
Merge pull request #123 from AtomLinter/greenkeeper/eslint-config-airbnb-base-12.0.0
Update eslint-config-airbnb-base to version 12.0.0 🚀
2 parents 9b2c6b5 + b356646 commit c9f20d3

File tree

4 files changed

+25
-23
lines changed

4 files changed

+25
-23
lines changed

lib/main.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ export default {
1010
require('atom-package-deps').install('linter-ruby');
1111

1212
this.subscriptions = new CompositeDisposable();
13-
this.subscriptions.add(atom.config.observe('linter-ruby.rubyExecutablePath',
14-
(value) => { this.executablePath = value; }));
15-
this.subscriptions.add(atom.config.observe('linter-ruby.ignoredExtensions',
16-
(value) => { this.ignoredExtensions = value; }));
13+
this.subscriptions.add(
14+
atom.config.observe('linter-ruby.rubyExecutablePath', (value) => {
15+
this.executablePath = value;
16+
}),
17+
atom.config.observe('linter-ruby.ignoredExtensions', (value) => {
18+
this.ignoredExtensions = value;
19+
}),
20+
);
1721
},
1822

1923
deactivate() {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
"atom-package-deps": "^4.0.1"
4141
},
4242
"devDependencies": {
43-
"eslint": "^4.5.0",
44-
"eslint-config-airbnb-base": "^11.3.2",
43+
"eslint": "^4.6.0",
44+
"eslint-config-airbnb-base": "^12.0.0",
4545
"eslint-plugin-import": "^2.7.0"
4646
},
4747
"package-deps": [

spec/.eslintrc.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
module.exports = {
22
env: {
3+
atomtest: true,
34
jasmine: true,
4-
atomtest: true
5+
},
6+
rules: {
7+
"import/no-extraneous-dependencies": [
8+
"error",
9+
{
10+
"devDependencies": true
11+
}
12+
]
513
}
614
};

spec/linter-ruby-spec.js

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { join } from 'path';
44

55
const goodPath = join(__dirname, 'fixtures', 'good.rb');
66
const badPath = join(__dirname, 'fixtures', 'bad.rb');
7-
const lint = require('../lib/main.js').provideLinter().lint;
7+
const { lint } = require('../lib/main.js').provideLinter();
88

99
describe('The Ruby provider for Linter', () => {
1010
beforeEach(() => {
@@ -21,21 +21,16 @@ describe('The Ruby provider for Linter', () => {
2121
});
2222

2323
it('should be in the packages list', () =>
24-
expect(atom.packages.isPackageLoaded('linter-ruby')).toBe(true),
25-
);
24+
expect(atom.packages.isPackageLoaded('linter-ruby')).toBe(true));
2625

2726
it('should be an active package', () =>
28-
expect(atom.packages.isPackageActive('linter-ruby')).toBe(true),
29-
);
27+
expect(atom.packages.isPackageActive('linter-ruby')).toBe(true));
3028

3129
describe('checks bad.rb and', () => {
3230
let editor = null;
3331
beforeEach(() => {
3432
waitsForPromise(() =>
35-
atom.workspace.open(badPath).then(
36-
(openEditor) => { editor = openEditor; },
37-
),
38-
);
33+
atom.workspace.open(badPath).then((openEditor) => { editor = openEditor; }));
3934
});
4035

4136
it('verifies the messages are correct', () =>
@@ -54,9 +49,7 @@ describe('The Ruby provider for Linter', () => {
5449
expect(messages[1].text).toBe('unexpected keyword_end, expecting end-of-input');
5550
expect(messages[1].filePath).toBe(badPath);
5651
expect(messages[1].range).toEqual([[12, 0], [12, 18]]);
57-
}),
58-
),
59-
);
52+
})));
6053
});
6154

6255
describe('checks good.rb and', () => {
@@ -65,9 +58,6 @@ describe('The Ruby provider for Linter', () => {
6558
atom.workspace.open(goodPath).then(editor =>
6659
lint(editor).then((messages) => {
6760
expect(messages.length).toBe(0);
68-
}),
69-
),
70-
),
71-
);
61+
}))));
7262
});
7363
});

0 commit comments

Comments
 (0)