-
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.
- Loading branch information
Showing
9 changed files
with
1,720 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,2 @@ | ||
[*] | ||
indent_size=2 |
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 |
---|---|---|
|
@@ -102,3 +102,5 @@ dist | |
|
||
# TernJS port file | ||
.tern-port | ||
|
||
.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Poool ESLint Config | ||
|
||
> Common ESLint rules we share between projects at Poool | ||
## Installation | ||
|
||
```bash | ||
yarn add @poool/eslint-config --dev | ||
npx install-peerdeps -Y @poool/eslint-config | ||
``` | ||
|
||
## Usage | ||
|
||
```json | ||
extends: ["@poool"] | ||
``` | ||
|
||
Available subconfigs: | ||
- `common` | ||
- `frontend` | ||
- `backend` | ||
|
||
```json | ||
extends: ["@poool/frontend"] | ||
``` |
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,10 @@ | ||
const OFF = 0; | ||
const WARNING = 1; | ||
const ERROR = 2; | ||
|
||
module.exports = { | ||
extends: [require.resolve('./common')], | ||
env: { | ||
node: true, | ||
}, | ||
}; |
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,42 @@ | ||
const OFF = 0; | ||
const WARNING = 1; | ||
const ERROR = 2; | ||
|
||
module.exports = { | ||
extends: ['eslint:recommended', 'standard'], | ||
parser: 'babel-eslint', | ||
parserOptions: { | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
}, | ||
plugins: [ | ||
'babel', | ||
], | ||
rules: { | ||
'comma-dangle': [WARNING, { | ||
'arrays': 'always-multiline', | ||
'objects': 'always-multiline', | ||
'imports': 'always-multiline', | ||
'exports': 'always-multiline', | ||
'functions': 'ignore', | ||
}], | ||
'semi': [ERROR, 'always'], | ||
'no-unused-vars': [WARNING, { | ||
varsIgnorePattern: '^_', | ||
argsIgnorePattern: '.+', | ||
}], | ||
'no-multiple-empty-lines': WARNING, | ||
'eol-last': OFF, | ||
'no-trailing-spaces': [WARNING, { skipBlankLines: true }], | ||
'no-console': [WARNING, { | ||
allow: ['warn', 'error', 'time', 'timeEnd', 'timeStamp'], | ||
}], | ||
'padded-blocks': OFF, | ||
'spaced-comment': OFF, | ||
'space-before-function-paren': WARNING, | ||
'new-cap': OFF, | ||
'max-len': WARNING, | ||
'object-curly-newline': OFF, | ||
'object-property-newline': OFF | ||
}, | ||
}; |
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 @@ | ||
const OFF = 0; | ||
const WARNING = 1; | ||
const ERROR = 2; | ||
|
||
module.exports = { | ||
env: { | ||
browser: true, | ||
}, | ||
extends: [require.resolve('./common'), 'plugin:react/recommended'], | ||
parser: 'babel-eslint', | ||
parserOptions: { | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
plugins: [ | ||
'babel', | ||
'react', | ||
], | ||
}; |
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,11 @@ | ||
const OFF = 0; | ||
const WARNING = 1; | ||
const ERROR = 2; | ||
|
||
module.exports = { | ||
extends: [ | ||
'./common', | ||
'./node', | ||
'./browser', | ||
].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,31 @@ | ||
{ | ||
"name": "@poool/eslint-config", | ||
"version": "0.0.1-alpha.1", | ||
"description": "Common ESLint rules we share between projects at Poool", | ||
"main": "index.js", | ||
"repository": "https://github.com/p3ol/eslint-config.git", | ||
"author": "Ugo Stephant <ugo@poool.fr>", | ||
"license": "MIT", | ||
"peerDependencies": { | ||
"babel-eslint": ">=10", | ||
"eslint": ">=6", | ||
"eslint-config-standard": ">=14", | ||
"eslint-plugin-babel": ">=5", | ||
"eslint-plugin-import": ">=2", | ||
"eslint-plugin-node": ">=11", | ||
"eslint-plugin-promise": ">=4", | ||
"eslint-plugin-react": ">=7", | ||
"eslint-plugin-standard": ">=4" | ||
}, | ||
"devDependencies": { | ||
"babel-eslint": "10.1.0", | ||
"eslint": "6.8.0", | ||
"eslint-config-standard": "14.1.1", | ||
"eslint-plugin-babel": "5.3.0", | ||
"eslint-plugin-import": "2.20.2", | ||
"eslint-plugin-node": "11.1.0", | ||
"eslint-plugin-promise": "4.2.1", | ||
"eslint-plugin-react": "7.20.0", | ||
"eslint-plugin-standard": "4.0.1" | ||
} | ||
} |
Oops, something went wrong.