-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit of the Leviy javascript styleguide including a default…
… ESLint config
- Loading branch information
0 parents
commit 5dd544b
Showing
5 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Leviy Javascript Styleguide | ||
|
||
In order to effectively apply the Leviy Javascript Styleguide in your project it's | ||
highly recommended to use the tools listed. These tools can easily be added to your project by | ||
installing the corresponding `@leviy/*-preset-default` or `@leviy/*-config-default` packages | ||
including their peer dependencies. Check the `README` for each of the package to read | ||
how you can install and use it. | ||
|
||
## Tools | ||
|
||
__ESLint__ [@leviy/eslint-config-default](https://github.com/leviy/javascript-coding-standard/tree/master/packages/eslint-config-default/) | ||
|
||
__Babel__ [@leviy/babel-preset-default](https://github.com/leviy/babel-preset-default/) | ||
|
||
__Webpack__ [@leviy/webpack-config-default](https://github.com/leviy/webpack-config-default/) | ||
|
||
__Jest__ [@leviy/jest-preset-default](https://github.com/leviy/jest-preset-default/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# @leviy/eslint-config-default | ||
|
||
Default [ESLint](https://eslint.org) config for Leviy development. | ||
|
||
## Installation | ||
|
||
Install the module including it's peer dependencies: | ||
|
||
```bash | ||
npx install-peerdeps @leviy/eslint-config-default --dev | ||
``` | ||
|
||
## Usage | ||
|
||
#### Via `.eslintrc` | ||
|
||
```js | ||
module.exports = { | ||
extends: '@leviy/eslint-config-default', | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
module.exports = { | ||
extends: 'airbnb-base', | ||
env: { | ||
'browser': true, | ||
'jquery': true, | ||
'jest/globals': true | ||
}, | ||
plugins: ['jest'], | ||
rules: { | ||
'import/first': 'off', | ||
'import/no-extraneous-dependencies': ['error', { | ||
'devDependencies': true | ||
}], | ||
'arrow-body-style': 'off', | ||
'class-methods-use-this': 'off', | ||
'max-len': [2, 140, 4], | ||
'indent': ['error', 4], | ||
'no-continue': 'off', | ||
'no-prototype-builtins': 'off', | ||
'no-underscore-dangle': ['error', { | ||
'allowAfterThis': true | ||
}], | ||
'object-shorthand': ['error', 'never'], | ||
'prefer-destructuring': ['error', { | ||
'array': false | ||
}] | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "@leviy/eslint-config-default", | ||
"version": "1.0.0", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://[email protected]:leviy/javascript-coding-standard.git" | ||
}, | ||
"homepage": "https://github.com/leviy/javascript-coding-standard/tree/master/packages/eslint-config-default/", | ||
"dependencies": { | ||
"eslint-config-airbnb-base": "^12.1", | ||
"eslint-plugin-jest": "^21.15" | ||
}, | ||
"peerDependencies": { | ||
"eslint": "^4.19", | ||
"eslint-plugin-import": "^2.11" | ||
} | ||
} |