-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from shakacode/alex/npm-eslint-config
Add npm eslint config package
- Loading branch information
Showing
12 changed files
with
140 additions
and
15 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,4 @@ | ||
node_modules/ | ||
*.log | ||
*.log* | ||
.DS_Store |
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
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,22 @@ | ||
{ | ||
"name": "shakacode-style-guide-javascript", | ||
"version": "0.0.1", | ||
"description": "Shakacode javascript style guide.", | ||
"authors": [ | ||
"Justin Gordon <[email protected]> (https://github.com/justin808)", | ||
"Alex Fedoseev <[email protected]> (https://github.com/alexfedoseev)" | ||
], | ||
"license": "MIT", | ||
"repository": "https://github.com/shakacode/style-guide-javascript", | ||
"bugs": { | ||
"url": "https://github.com/shakacode/style-guide-javascript/issues" | ||
}, | ||
"engines": { | ||
"node": ">=4.2.0" | ||
}, | ||
"scripts": { | ||
"release:patch": "cd packages/eslint-config-shakacode && npm run release:patch", | ||
"release:minor": "cd packages/eslint-config-shakacode && npm run release:minor", | ||
"release:major": "cd packages/eslint-config-shakacode && npm run release:major" | ||
} | ||
} |
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,31 @@ | ||
# eslint-config-shakacode | ||
|
||
Shakacode `eslint` config. | ||
|
||
## Install | ||
|
||
```bash | ||
npm install --save-dev eslint-config-shakacode eslint-config-airbnb eslint | ||
|
||
# We need Babel as we use experimental features and flow syntax | ||
npm install --save-dev babel-eslint | ||
|
||
# If it's React project | ||
npm install --save-dev eslint-plugin-react | ||
``` | ||
|
||
## Use | ||
|
||
React project: | ||
|
||
```yml | ||
--- | ||
extends: eslint-config-shakacode | ||
``` | ||
Non-React project: | ||
```yml | ||
--- | ||
extends: eslint-config-shakacode/base | ||
``` |
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,7 @@ | ||
module.exports = { | ||
'parser': 'babel-eslint', | ||
'extends': [ | ||
'eslint-config-airbnb/base', | ||
'eslint-config-shakacode/rules/javascript', | ||
].map(require.resolve), | ||
}; |
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,8 @@ | ||
module.exports = { | ||
'parser': 'babel-eslint', | ||
'extends': [ | ||
'eslint-config-airbnb', | ||
'eslint-config-shakacode/rules/javascript', | ||
'eslint-config-shakacode/rules/react', | ||
].map(require.resolve), | ||
}; |
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 @@ | ||
{ | ||
"name": "eslint-config-shakacode", | ||
"version": "0.0.1", | ||
"description": "Shakacode eslint config.", | ||
"authors": [ | ||
"Justin Gordon <[email protected]> (https://github.com/justin808)", | ||
"Alex Fedoseev <[email protected]> (https://github.com/alexfedoseev)" | ||
], | ||
"license": "MIT", | ||
"repository": "https://github.com/shakacode/style-guide-javascript", | ||
"bugs": { | ||
"url": "https://github.com/shakacode/style-guide-javascript/issues" | ||
}, | ||
"main": "index.js", | ||
"engines": { | ||
"node": ">=4.2.0" | ||
}, | ||
"scripts": { | ||
"release:patch": "scripts/release patch", | ||
"release:minor": "scripts/release minor", | ||
"release:major": "scripts/release major" | ||
}, | ||
"peerDependencies": { | ||
"babel-eslint": "*", | ||
"eslint": "*", | ||
"eslint-config-airbnb": "*" | ||
} | ||
} |
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,7 @@ | ||
module.exports = { | ||
'extends': ( | ||
require | ||
.resolve('eslint-config-shakacode') | ||
.replace('index.js', 'rules/javascript.yml') | ||
), | ||
}; |
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,3 @@ | ||
--- | ||
# In case if we'll want to override some airbnb rules | ||
# rules: |
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,7 @@ | ||
module.exports = { | ||
'extends': ( | ||
require | ||
.resolve('eslint-config-shakacode') | ||
.replace('index.js', 'rules/react.yml') | ||
), | ||
}; |
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,5 @@ | ||
--- | ||
rules: | ||
# ES7 static is not supported yet | ||
# See https://github.com/yannickcr/eslint-plugin-react/issues/128 | ||
react/sort-comp: 0 |
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,6 @@ | ||
#!/bin/sh | ||
|
||
npm version $1 -m "Bump version to %s" | ||
git push | ||
git push --tags | ||
npm publish |