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

Commit ea10d6d

Browse files
committed
Merge pull request #38 from AtomLinter/independant-package
Convert to independant package.
2 parents f9c4175 + 1726ce0 commit ea10d6d

3 files changed

Lines changed: 10 additions & 24 deletions

File tree

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@ linter-ruby
44
This linter plugin for [Linter](https://github.com/AtomLinter/Linter) provides an interface to Ruby's builtin syntax analysis. It will be used with files that have the `Ruby` syntax.
55

66
## Installation
7-
Linter package must be installed in order to use this plugin. If Linter is not installed, please follow the instructions [here](https://github.com/AtomLinter/Linter).
7+
On first activation the plugin will install all dependencies automatically, you no longer have to worry about installing Linter.
88

9-
### Plugin installation
10-
```
11-
$ apm install linter-ruby
12-
```
9+
Just install this package and you'll be good to go.
1310

1411
## Settings
1512
You can configure linter-ruby by editing ~/.atom/config.cson (choose Open Your Config in Atom menu):

lib/main.js

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,9 @@ export default {
1616
},
1717

1818
activate: () => {
19-
// Because all of the grammars this linter supports are
20-
// built into the editor we do not need to throw errors when
21-
// any one of the grammmars isn't installed. If a user has the grammar
22-
// disabled that is a choice they have made.
23-
24-
// Show the user an error if they do not have an appropriate linter base
25-
// package installed from Atom Package Manager. This will not be an issues
26-
// after a base linter package is integrated into Atom, in the comming
27-
// months.
28-
// TODO: Remove when Linter Base is integrated into Atom.
29-
if (!atom.packages.getLoadedPackages("linter")) {
30-
atom.notifications.addError(
31-
"Linter package not found.",
32-
{
33-
detail: "Please install the `linter` package in your Settings view."
34-
}
35-
);
36-
}
19+
// We are now using steelbrain's package dependency package to install our
20+
// dependencies.
21+
require("atom-package-deps").install("linter-ruby");
3722
},
3823

3924
provideLinter: () => {

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,15 @@
1616
}
1717
},
1818
"dependencies": {
19-
"atom-linter": "^3.0.0"
19+
"atom-linter": "^3.0.0",
20+
"atom-package-deps": "^2.0.1"
2021
},
2122
"devDependencies": {
2223
"eslint": "latest"
2324
},
25+
"package-deps": [
26+
"linter"
27+
],
2428
"eslintConfig": {
2529
"env": {
2630
"es6": true,

0 commit comments

Comments
 (0)