Skip to content

Commit 5dd544b

Browse files
author
Dennis Coorn
committed
Initial commit of the Leviy javascript styleguide including a default ESLint config
0 parents  commit 5dd544b

File tree

5 files changed

+84
-0
lines changed

5 files changed

+84
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/.idea/

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Leviy Javascript Styleguide
2+
3+
In order to effectively apply the Leviy Javascript Styleguide in your project it's
4+
highly recommended to use the tools listed. These tools can easily be added to your project by
5+
installing the corresponding `@leviy/*-preset-default` or `@leviy/*-config-default` packages
6+
including their peer dependencies. Check the `README` for each of the package to read
7+
how you can install and use it.
8+
9+
## Tools
10+
11+
__ESLint__ [@leviy/eslint-config-default](https://github.com/leviy/javascript-coding-standard/tree/master/packages/eslint-config-default/)
12+
13+
__Babel__ [@leviy/babel-preset-default](https://github.com/leviy/babel-preset-default/)
14+
15+
__Webpack__ [@leviy/webpack-config-default](https://github.com/leviy/webpack-config-default/)
16+
17+
__Jest__ [@leviy/jest-preset-default](https://github.com/leviy/jest-preset-default/)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# @leviy/eslint-config-default
2+
3+
Default [ESLint](https://eslint.org) config for Leviy development.
4+
5+
## Installation
6+
7+
Install the module including it's peer dependencies:
8+
9+
```bash
10+
npx install-peerdeps @leviy/eslint-config-default --dev
11+
```
12+
13+
## Usage
14+
15+
#### Via `.eslintrc`
16+
17+
```js
18+
module.exports = {
19+
extends: '@leviy/eslint-config-default',
20+
};
21+
```
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
module.exports = {
2+
extends: 'airbnb-base',
3+
env: {
4+
'browser': true,
5+
'jquery': true,
6+
'jest/globals': true
7+
},
8+
plugins: ['jest'],
9+
rules: {
10+
'import/first': 'off',
11+
'import/no-extraneous-dependencies': ['error', {
12+
'devDependencies': true
13+
}],
14+
'arrow-body-style': 'off',
15+
'class-methods-use-this': 'off',
16+
'max-len': [2, 140, 4],
17+
'indent': ['error', 4],
18+
'no-continue': 'off',
19+
'no-prototype-builtins': 'off',
20+
'no-underscore-dangle': ['error', {
21+
'allowAfterThis': true
22+
}],
23+
'object-shorthand': ['error', 'never'],
24+
'prefer-destructuring': ['error', {
25+
'array': false
26+
}]
27+
}
28+
};
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "@leviy/eslint-config-default",
3+
"version": "1.0.0",
4+
"repository": {
5+
"type": "git",
6+
"url": "git+ssh://[email protected]:leviy/javascript-coding-standard.git"
7+
},
8+
"homepage": "https://github.com/leviy/javascript-coding-standard/tree/master/packages/eslint-config-default/",
9+
"dependencies": {
10+
"eslint-config-airbnb-base": "^12.1",
11+
"eslint-plugin-jest": "^21.15"
12+
},
13+
"peerDependencies": {
14+
"eslint": "^4.19",
15+
"eslint-plugin-import": "^2.11"
16+
}
17+
}

0 commit comments

Comments
 (0)