Global Linter Config's for KevinBacon-CI.
If you wish to modify one of the configs below is a list of where all of the docs are for each of the linters
Follow the steps below to config Sublime text with all of the KevinBacon support linters and configs.
- Clone this repo with
git clone https://github.com/gateway-church/kevinbacon-ci-config.git
- Install SublimeLint Package
CMD + SHIFT + P - SublimeLint
- Install the following SublimeLint packages using the package manager like above
- SublimeLinter-haml-lint
- SublimeLinter-contrib-scss-lint
- SublimeLinter-jshint
- SublimeLinter-coffeelint
- SublimeLinter-rubocop
- Once those are installed navigate to
Sublime Text -> Preferences -> Package Settings -> SublimeLinter -> Settings
- Replace the config with the one below Note: Be sure to swap out the {path-to-repo} with the place you cloned the repo to
// SublimeLinter Settings - User
{
"debug": false,
"delay": 0,
"gutter_theme": "",
"lint_mode": "background",
"linters": {
"coffeelint": {
"disable": false,
"args": [
"--config",
"{path-to-repo}/kevinbacon-ci-config/coffeescript/.coffee-lint.json"
]
},
"haml": {
"disable": false,
"args": [
"--config",
"{path-to-repo}/kevinbacon-ci-config/haml/.haml-lint.yml"
]
},
"hamllint": {
"disable": false,
"args": [
"--config",
"{path-to-repo}/kevinbacon-ci-config/haml/.haml-lint.yml"
]
},
"jshint": {
"disable": false,
"args": [
"--config",
"{path-to-repo}/kevinbacon-ci-config/javascript/.jshintrc"
]
},
"rubocop": {
"disable": false,
"args": [
"--config",
"{path-to-repo}/kevinbacon-ci-config/ruby/.rubocop.yml"
]
},
"scsslint": {
"disable": false,
"args": [
"--config",
"{path-to-repo}/kevinbacon-ci-config/scss/.scss-lint.yml"
]
}
},
"paths": {
"linux": [],
"osx": [
"~/.rbenv/shims"
],
"windows": []
}
}
Follow the steps below to config KevinBacon Linters in Visual Studio Code
- Clone this repo with
git clone https://github.com/gateway-church/kevinbacon-ci-config.git
- Install the extensions below
Note: Haml Lint isn't support by Visual Studio Code quite yet
- Navigate to your user settings
Code -> Preferences -> Settings
orCMD + ,
- Add the settings below to your user config Note: Be sure to swap out the paths with the place you cloned the repo to
"jshint.config": "/path/to/where/you/cloned/kevinbacon-ci-config/javascript/.jshintrc",
"jshint.excludePath": "/path/to/where/you/cloned/kevinbacon-ci-config/javascript/.jshintignore",
"scssLint.showHighlights": false,
"scssLint.errorBackgroundColor": "rgba(200, 0, 0, .8)",
"scssLint.warningBackgroundColor": "rgba(200, 120, 0, .8)",
"scssLint.languages": [
"css",
"scss"
],
"scssLint.statusBarText": "`$(telescope) scss-lint ${errors.length} $(x) ${warnings.length} $(alert)`",
"scssLint.configDir": "/path/to/where/you/cloned/kevinbacon-ci-config/scss/.scss-lint.yml",
"ruby.rubocop.configFilePath": "/path/to/where/you/cloned/kevinbacon-ci-config/ruby/.rubocop.yml",
"coffeelinter.defaultRules": "/path/to/where/you/cloned/kevinbacon-ci-config/coffeescript/.coffee-lint.json"
If you have not installed Atom, follow the instructions below for "Installing Atom".
Then go through the instructions below for "Installing and Configuring Atom Linters". Use the instructions for "Installing Atom Plugins", anytime you are asked to install a plugin.
Download it from, https://atom.io/. For Mac, unzip, and copy app to Applications folder. Double click file to run.
Verify Basic Editor Settings From the menu bar, Click (select) "Atom" -> "Preferences" to open the settings page, and then click on "Editor" located in the left column. Make sure that:
- The following are checked: "Atomic Soft Tabs", "Auto Indent", "Auto Indent on Paste", "Confirm Checkout HEAD revision".
- The "Preferred line length" is set to "120".
- That "Soft tabs" is checked.
- That "Tab length" is "2". That should be the editor's default value.
- "Tab type" is set to "Soft"
Other settings you may want enabled: "Show Cursor on Selection", "Show Indent Guide", "Show Invisibles", "Show Line Numbers".
Then click on the Packages tab, and search for "Whitespace". Click "Settings" under the "Whitespace" plugin, and make sure the following are checked: "Ensure Single Trailing New Line", "Keep Markdown Line Break Whitespace", and "Removing Trailing Whitespace". Make sure the following are not checked: "Ignore Whitespace on Current Line", and "Ignore Whitespace Only Lines".
As you go through the "Installing and Configuring linters" section, you will need to reference these instructions.
-
In the menu click (select) "Atom" -> "Preferences". This should open the setting page.
-
On the settings page, click (select) "Install" from the left column.
-
Search for the plugin to install, and click the install button for that plugin.
-
Click on Settings to modify settings.
In the instructions below you will be asked to install and configure plugins. When a plugin configuration has {path-to-repo} you will need to replace that with the path to kevinbacon-ci-config. For Mac an easy way to find this is to open finder and locate the folder, right click, then click "get info". Then copy the path from the "Where" field, and add '/kevinbacon-ci-config'.
-
Clone this repo with
git clone https://github.com/gateway-church/kevinbacon-ci-config.git
. -
Make sure you have installed the following ruby gems. If not install them.
- rubocop ( Is it installed:
gem list rubocop
. To install:gem install rubocop
) - scss_lint ( Is it installed:
gem list scss_lint
. To install:gem install scss_lint
)
- rubocop ( Is it installed:
-
Install the following Atom plugins (see Installing Atom Plugins)
-
linter-ui-default
-
linter Settings: verify the following are enabled: "lint preview tabs", "lint on open", "lint on change".
-
linter-haml Settings: set "the coffeelint.json path" to "{path-to-repo}/coffeescript/.coffee-lint.json"
-
linter-jshint Settings: set "Global Haml lint yml file" to {path-to-repo}/haml/.haml-lint.yml.
-
linter-rubocop Settings: set "Command" to "{path-to-rubocop-gem} --config path-to-repo}/ruby/.rubocop.yml"
"{path-to-rubocop-gem}" should be replaced with the actual path to the gem file. To get that go to a command prompt and run
which rubocop
-
linter-scss-lint Settings: set "Config Name" to "{path-to-repo}/scss/.scss-lint.yml", and "Executable Path" to the path to the lint-scss ruby gem.
To get the path to your lint-scss gem, go to a command prompt and run
which scss-lint
. -
linter-coffeelint Settings: set "coffeelint.json Path" to "{path-to-repo}/coffeescript/.coffee-lint.json"
-