Skip to content

Commit

Permalink
Added Prettier
Browse files Browse the repository at this point in the history
closes #3
  • Loading branch information
Benjamin Van Renterghem committed Apr 13, 2019
1 parent 6c72fce commit d1c8a1b
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 60 deletions.
11 changes: 11 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"tabWidth": 4,
"arrowParens": "always",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"useTabs": false,
"trailingComma": "es5",
"semi": true,
"singleQuote": false,
"printWidth": 120
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "1.0.0",
"private": true,
"dependencies": {
"@types/react-color": "^2.14.0",
"antd": "3.12.1",
"classnames": "2.2.6",
"core-js": "2.6.1",
Expand Down Expand Up @@ -36,6 +35,7 @@
"@types/jest": "23.3.10",
"@types/node": "10.12.18",
"@types/react": "16.7.18",
"@types/react-color": "2.14.0",
"@types/react-dom": "16.0.11",
"@types/react-helmet": "5.0.7",
"@types/react-router": "4.4.3",
Expand All @@ -44,6 +44,7 @@
"npm-run-all": "4.1.5",
"react-scripts": "2.1.1",
"tslint": "5.12.0",
"tslint-plugin-prettier": "^2.0.1",
"tslint-react": "3.6.0",
"typescript": "3.2.2",
"typescript-plugin-css-modules": "1.0.5",
Expand Down
60 changes: 26 additions & 34 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,28 @@
{
"compilerOptions": {
"target": "es6",
"allowJs": true,
"skipLibCheck": false,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "preserve",
"lib": [
"es6",
"dom",
"es2018.promise"
],
"plugins": [
{
"name": "typescript-plugin-css-modules"
},
{
"name": "typescript-tslint-plugin"
}
],
"forceConsistentCasingInFileNames": false
},
"include": [
"src"
],
"exclude": [
"node_modules"
]
"compilerOptions": {
"target": "es6",
"allowJs": true,
"skipLibCheck": false,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "preserve",
"lib": ["es6", "dom", "es2018.promise"],
"plugins": [
{
"name": "typescript-plugin-css-modules"
},
{
"name": "typescript-tslint-plugin"
}
],
"forceConsistentCasingInFileNames": false
},
"include": ["src"],
"exclude": ["node_modules"]
}
30 changes: 7 additions & 23 deletions tslint.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,21 @@
{
"extends": [
"tslint:latest",
"tslint-react"
],
"extends": ["tslint:latest", "tslint-react", "tslint-config-prettier"],
"rulesDirectory": ["tslint-plugin-prettier"],
"rules": {
"whitespace": [
true,
"check-module"
],
"prettier": true,
"whitespace": [true, "check-module"],
"member-ordering": [
true,
{
"order": "fields-first"
}
],
"no-submodule-imports": [
true,
"moment/locale",
"antd/lib",
"firebase",
"core-js/modules"
],
"no-submodule-imports": [true, "moment/locale", "antd/lib", "firebase", "core-js/modules"],
"max-line-length": false,
"object-literal-sort-keys": false,
"no-empty-interface": false,
"typedef": [
true,
"call-signature"
],
"no-implicit-dependencies": [
true,
"dev"
],
"typedef": [true, "call-signature"],
"no-implicit-dependencies": [true, "dev"],
"jsx-no-multiline-js": false,
"jsx-equals-spacing": true,
"jsx-self-close": true,
Expand Down
36 changes: 34 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.1.tgz#48fd98c1561fe718b61733daed46ff115b496e18"
integrity sha512-eqz8c/0kwNi/OEHQfvIuJVLTst3in0e7uTKeuY+WL/zfKn0xVujOTp42bS/vUUokhK5P2BppLd9JXMOMHcgbjA==

"@types/react-color@^2.14.0":
"@types/[email protected]":
version "2.14.0"
resolved "https://registry.yarnpkg.com/@types/react-color/-/react-color-2.14.0.tgz#e01f6069902819fe9f6544375829a485f894206f"
integrity sha512-5UfGjUsu7bXop7K064nNrIGgS7wPjGEY7Or9tAE6BLslDtfhRnAlqWo9N2BIntEZ/3KpXlRnt0MBuc+hZJTevw==
Expand Down Expand Up @@ -3813,6 +3813,14 @@ [email protected]:
has "^1.0.3"
jsx-ast-utils "^2.0.1"

eslint-plugin-prettier@^2.2.0:
version "2.7.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.7.0.tgz#b4312dcf2c1d965379d7f9d5b5f8aaadc6a45904"
integrity sha512-CStQYJgALoQBw3FsBzH0VOVDRnJ/ZimUlpLm226U8qgqYJfPOY/CPK6wyRInMxh73HSKg5wyRwdS4BVYYHwokA==
dependencies:
fast-diff "^1.1.1"
jest-docblock "^21.0.0"

[email protected]:
version "7.11.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.11.1.tgz#c01a7af6f17519457d6116aa94fc6d2ccad5443c"
Expand Down Expand Up @@ -4162,6 +4170,11 @@ fast-deep-equal@^2.0.1:
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49"
integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=

fast-diff@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03"
integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==

fast-glob@^2.0.2:
version "2.2.4"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.4.tgz#e54f4b66d378040e0e4d6a68ec36bbc5b04363c0"
Expand Down Expand Up @@ -5880,6 +5893,11 @@ jest-diff@^23.6.0:
jest-get-type "^22.1.0"
pretty-format "^23.6.0"

jest-docblock@^21.0.0:
version "21.2.0"
resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-21.2.0.tgz#51529c3b30d5fd159da60c27ceedc195faf8d414"
integrity sha512-5IZ7sY9dBAYSV+YjQ0Ovb540Ku7AO9Z5o2Cg789xj167iQuZ2cG+z0f3Uct6WeYLbU6aQiM2pCs7sZ+4dotydw==

jest-docblock@^23.2.0:
version "23.2.0"
resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-23.2.0.tgz#f085e1f18548d99fdd69b20207e6fd55d91383a7"
Expand Down Expand Up @@ -6420,6 +6438,11 @@ levn@^0.3.0, levn@~0.3.0:
prelude-ls "~1.1.2"
type-check "~0.3.2"

lines-and-columns@^1.1.6:
version "1.1.6"
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00"
integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=

load-json-file@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"
Expand Down Expand Up @@ -10844,11 +10867,20 @@ [email protected]:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8"
integrity sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==

tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0:
tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0:
version "1.9.3"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==

tslint-plugin-prettier@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/tslint-plugin-prettier/-/tslint-plugin-prettier-2.0.1.tgz#95b6a3b766622ffc44375825d7760225c50c3680"
integrity sha512-4FX9JIx/1rKHIPJNfMb+ooX1gPk5Vg3vNi7+dyFYpLO+O57F4g+b/fo1+W/G0SUOkBLHB/YKScxjX/P+7ZT/Tw==
dependencies:
eslint-plugin-prettier "^2.2.0"
lines-and-columns "^1.1.6"
tslib "^1.7.1"

[email protected]:
version "3.6.0"
resolved "https://registry.yarnpkg.com/tslint-react/-/tslint-react-3.6.0.tgz#7f462c95c4a0afaae82507f06517ff02942196a1"
Expand Down

0 comments on commit d1c8a1b

Please sign in to comment.