Skip to content

Commit

Permalink
feat: Add the pancake eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
RabbitDoge committed Nov 13, 2020
1 parent 12adffc commit fb3608d
Show file tree
Hide file tree
Showing 3 changed files with 1,234 additions and 1,232 deletions.
52 changes: 1 addition & 51 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,53 +1,3 @@
{
"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": "error",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["error"],
"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,
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"mjs": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
]
}
"extends": "@pancakeswap-libs/eslint-config-pancake"
}
9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@babel/preset-env": "^7.12.1",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@pancakeswap-libs/eslint-config-pancake": "0.1.0",
"@rollup/plugin-typescript": "^6.0.0",
"@storybook/addon-a11y": "^6.0.26",
"@storybook/addon-actions": "^6.0.26",
Expand All @@ -43,13 +44,7 @@
"@typescript-eslint/parser": "^4.4.1",
"babel-loader": "^8.1.0",
"babel-plugin-styled-components": "^1.11.1",
"eslint": "7.2.0",
"eslint-config-airbnb": "18.2.0",
"eslint-config-prettier": "^6.12.0",
"eslint-plugin-import": "^2.21.2",
"eslint-plugin-jsx-a11y": "^6.3.0",
"eslint-plugin-react": "^7.20.0",
"eslint-plugin-react-hooks": "4.0.0",
"eslint": "^7.2.0",
"husky": "^4.3.0",
"jest": "^26.5.3",
"np": "^6.5.0",
Expand Down
Loading

0 comments on commit fb3608d

Please sign in to comment.