Skip to content

Commit

Permalink
chore: Update eslint and prettier configs to use keep plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
georgeweiler committed Sep 14, 2021
1 parent 1ddb707 commit ea6026b
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 44 deletions.
26 changes: 21 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
module.exports = {
parser: '@typescript-eslint/parser',
root: true,
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
env: {
browser: true,
es6: true,
},
extends: [
"eslint-config-keep",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
],
plugins: ["react"],
rules: {
"react/prop-types": 0,
"react/display-name": 0,
"no-invalid-this": 0,
},
settings: {
react: {
version: 'detect',
version: "detect",
},
},
extends: ['plugin:react/recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
};
}
1 change: 0 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
. "$(dirname "$0")/_/husky.sh"

yarn run pre-commit

1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
src/stories
8 changes: 2 additions & 6 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
module.exports = {
semi: true,
trailingComma: 'all',
singleQuote: true,
printWidth: 120,
tabWidth: 2,
};
...require("@keep-network/prettier-config-keep"),
}
18 changes: 2 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,6 @@
"storybook": "start-storybook -p 6006 -s public",
"build-storybook": "build-storybook -s public"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
],
"overrides": [
{
"files": [
"**/*.stories.*"
],
"rules": {
"import/no-anonymous-default-export": "off"
}
}
]
},
"browserslist": {
"production": [
">0.2%",
Expand All @@ -69,6 +53,7 @@
"devDependencies": {
"@commitlint/cli": "^13.1.0",
"@commitlint/config-conventional": "^13.1.0",
"@keep-network/prettier-config-keep": "github:keep-network/prettier-config-keep#d6ec02e",
"@storybook/addon-actions": "^6.3.8",
"@storybook/addon-essentials": "^6.3.8",
"@storybook/addon-links": "^6.3.8",
Expand All @@ -78,6 +63,7 @@
"@typescript-eslint/eslint-plugin": "^4.31.1",
"@typescript-eslint/parser": "^4.31.1",
"eslint": "^7.32.0",
"eslint-config-keep": "github:keep-network/eslint-config-keep#0c27ade",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.25.1",
Expand Down
12 changes: 6 additions & 6 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React from 'react';
import { ChakraProvider, Heading } from '@chakra-ui/react';
import theme from './theme';
import React, { FC } from "react"
import { ChakraProvider, Heading } from "@chakra-ui/react"
import theme from "./theme"

function App() {
const App: FC = () => {
return (
<ChakraProvider theme={theme}>
<div>
<Heading>Threshold Token Dashboard</Heading>
</div>
</ChakraProvider>
);
)
}

export default App;
export default App
10 changes: 5 additions & 5 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import React from "react"
import ReactDOM from "react-dom"
import App from "./App"

ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root'),
);
document.getElementById("root")
)
6 changes: 3 additions & 3 deletions src/theme.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { extendTheme } from '@chakra-ui/react';
import { extendTheme } from "@chakra-ui/react"

// TODO: Create theme extensions after discussing with design team
// const colors = {
Expand All @@ -9,6 +9,6 @@ import { extendTheme } from '@chakra-ui/react';
// },
// }

const theme = extendTheme({});
const theme = extendTheme({})

export default theme;
export default theme
42 changes: 41 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2483,6 +2483,14 @@
"@types/yargs" "^16.0.0"
chalk "^4.0.0"

"@keep-network/prettier-config-keep@github:keep-network/prettier-config-keep":
version "0.0.1"
resolved "https://codeload.github.com/keep-network/prettier-config-keep/tar.gz/a1a333e7ac49928a0f6ed39421906dd1e46ab0f3"

"@keep-network/prettier-config-keep@github:keep-network/prettier-config-keep#d6ec02e":
version "0.0.1"
resolved "https://codeload.github.com/keep-network/prettier-config-keep/tar.gz/d6ec02e80dd76edfba073ca58ef99aee39002c2c"

"@mdx-js/loader@^1.6.22":
version "1.6.22"
resolved "https://registry.yarnpkg.com/@mdx-js/loader/-/loader-1.6.22.tgz#d9e8fe7f8185ff13c9c8639c048b123e30d322c4"
Expand Down Expand Up @@ -7135,6 +7143,28 @@ escodegen@^2.0.0:
optionalDependencies:
source-map "~0.6.1"

eslint-config-google@^0.13.0:
version "0.13.0"
resolved "https://registry.yarnpkg.com/eslint-config-google/-/eslint-config-google-0.13.0.tgz#e277d16d2cb25c1ffd3fd13fb0035ad7421382fe"
integrity sha512-ELgMdOIpn0CFdsQS+FuxO+Ttu4p+aLaXHv9wA9yVnzqlUGV7oN/eRRnJekk7TCur6Cu2FXX0fqfIXRBaM14lpQ==

"eslint-config-keep@github:keep-network/eslint-config-keep#0c27ade":
version "0.3.0"
resolved "https://codeload.github.com/keep-network/eslint-config-keep/tar.gz/0c27ade54e725f980e971c3d91ea88bab76b2330"
dependencies:
"@keep-network/prettier-config-keep" "github:keep-network/prettier-config-keep"
eslint-config-google "^0.13.0"
eslint-config-prettier "^6.15.0"
eslint-plugin-no-only-tests "^2.3.1"
eslint-plugin-prettier "^3.1.2"

eslint-config-prettier@^6.15.0:
version "6.15.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz#7f93f6cb7d45a92f1537a70ecc06366e1ac6fed9"
integrity sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw==
dependencies:
get-stdin "^6.0.0"

eslint-config-prettier@^8.3.0:
version "8.3.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz#f7471b20b6fe8a9a9254cc684454202886a2dd7a"
Expand Down Expand Up @@ -7216,7 +7246,12 @@ eslint-plugin-jsx-a11y@^6.3.1:
jsx-ast-utils "^3.1.0"
language-tags "^1.0.5"

eslint-plugin-prettier@^4.0.0:
eslint-plugin-no-only-tests@^2.3.1:
version "2.6.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-2.6.0.tgz#19f6c9620bda02b9b9221b436c5f070e42628d76"
integrity sha512-T9SmE/g6UV1uZo1oHAqOvL86XWl7Pl2EpRpnLI8g/bkJu+h7XBCB+1LnubRZ2CUQXj805vh4/CYZdnqtVaEo2Q==

eslint-plugin-prettier@^3.1.2, eslint-plugin-prettier@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz#8b99d1e4b8b24a762472b4567992023619cb98e0"
integrity sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ==
Expand Down Expand Up @@ -8113,6 +8148,11 @@ get-package-type@^0.1.0:
resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a"
integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==

get-stdin@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b"
integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==

get-stream@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5"
Expand Down

0 comments on commit ea6026b

Please sign in to comment.