-
Notifications
You must be signed in to change notification settings - Fork 751
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
1 parent
018d7e5
commit 0e0454e
Showing
4 changed files
with
1,432 additions
and
2,153 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,15 @@ | ||
# eslint-config-pancake | ||
|
||
Pancake Eslint config with: | ||
|
||
- Airbnb config | ||
- Typescript | ||
- Prettier | ||
|
||
## Usage | ||
|
||
``` | ||
npx install-peerdeps --dev @pancakeswap-libs/eslint-config-pancake | ||
``` | ||
|
||
Add `"extends": "@pancakeswap-libs/eslint-config-pancake"` to your eslint config file. |
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,54 @@ | ||
module.exports = { | ||
root: true, | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
ecmaVersion: 2017, | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
env: { | ||
es6: true, | ||
browser: true, | ||
}, | ||
settings: { | ||
"import/resolver": { | ||
node: { | ||
extensions: [".js", ".ts", ".jsx", ".tsx"], | ||
}, | ||
}, | ||
"import/extensions": [".js", ".ts", ".jsx", ".tsx"], | ||
}, | ||
extends: [ | ||
"airbnb", | ||
"airbnb/hooks", | ||
"prettier", | ||
"prettier/react", | ||
"prettier/@typescript-eslint", | ||
"plugin:@typescript-eslint/recommended", | ||
], | ||
rules: { | ||
// Typescript | ||
"@typescript-eslint/no-unused-vars": "warn", | ||
"no-use-before-define": "off", | ||
"@typescript-eslint/no-use-before-define": ["warn"], | ||
"no-shadow": "off", | ||
"@typescript-eslint/no-shadow": ["error"], | ||
// React | ||
"react/jsx-filename-extension": ["error", { extensions: [".tsx"] }], | ||
"react/prop-types": 0, | ||
"react/jsx-props-no-spreading": 0, | ||
"react/no-multi-comp": 0, | ||
"import/extensions": [ | ||
"error", | ||
"ignorePackages", | ||
{ | ||
js: "never", | ||
mjs: "never", | ||
jsx: "never", | ||
ts: "never", | ||
tsx: "never", | ||
}, | ||
], | ||
}, | ||
}; |
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,27 @@ | ||
{ | ||
"name": "@pancakeswap-libs/eslint-config-pancake", | ||
"version": "1.0.0", | ||
"description": "Eslint config for PancakeSwap", | ||
"main": "lib/index.js", | ||
"files": [ | ||
"lib" | ||
], | ||
"repository": "git@github.com:pancakeswap/eslint-config-pancake.git", | ||
"license": "MIT", | ||
"author": "RabbitDoge", | ||
"private": false, | ||
"dependencies": { | ||
"@typescript-eslint/eslint-plugin": "^4.7.0", | ||
"@typescript-eslint/parser": "^4.7.0", | ||
"eslint-config-airbnb": "^18.2.1", | ||
"eslint-config-prettier": "^6.15.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-jsx-a11y": "^6.4.1", | ||
"eslint-plugin-react": "^7.21.5", | ||
"eslint-plugin-react-hooks": "^4.0.0" | ||
}, | ||
"peerDependencies": { | ||
"eslint": "^7.2.0", | ||
"prettier": "^2.1.2" | ||
} | ||
} |
Oops, something went wrong.