Skip to content

Commit 71f625b

Browse files
author
spoeck
committed
add prettier 2 configuration
1 parent f60eed6 commit 71f625b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1564
-5376
lines changed

.eslintrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": ["plugin:prettier/recommended"],
3+
"plugins": ["prettier"],
4+
"rules": {
5+
"prettier/prettier": "error"
6+
}
7+
}

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
build/
2+
dist/
3+
lib/build/
4+
lib/dist/

.prettierrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"useTabs": true,
33
"tabWidth": 4,
44
"trailingComma": "es5",
5-
"printWidth": 80
5+
"printWidth": 120,
6+
"singleQuote": true
67
}

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"typescript.tsdk": "node_modules/typescript/lib"
3-
}
2+
"typescript.tsdk": "node_modules/typescript/lib"
3+
}

.vscode/snippets/typescriptreact.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@
137137
},
138138
"useState": {
139139
"prefix": "state",
140-
"body": [
141-
"const [${1:value}, set${2:Value}] = React.useState(${3:value});$0"
142-
]
140+
"body": ["const [${1:value}, set${2:Value}] = React.useState(${3:value});$0"]
143141
}
144142
}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Inspired by:
2121
- [x] [Redux DevTools Extension](https://github.com/zalmoxisus/redux-devtools-extension)
2222
- [x] [TodoMVC example](http://todomvc.com)
2323
- [x] PWA Support
24+
- [x] Prettier 2 support
2425
- [x] Local Project Library (/lib)
2526

2627
## Roadmap

lib/.prettierignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

lib/.storybook/addons.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
import "@storybook/addon-actions/register";
2-
import "@storybook/addon-links/register";
1+
import '@storybook/addon-actions/register';
2+
import '@storybook/addon-links/register';

lib/.storybook/config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import { configure } from "@storybook/react";
1+
import { configure } from '@storybook/react';
22

3-
configure(require.context("../src", true, /\.stories\.tsx$/), module);
3+
configure(require.context('../src', true, /\.stories\.tsx$/), module);

lib/.storybook/webpack.config.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
const path = require("path");
2-
const SRC_PATH = path.join(__dirname, "../src");
1+
const path = require('path');
2+
const SRC_PATH = path.join(__dirname, '../src');
33

44
module.exports = ({ config }) => {
5-
config.module.rules.push({
6-
test: /\.(ts|tsx)$/,
7-
include: [SRC_PATH],
8-
use: [
9-
{
10-
loader: require.resolve("awesome-typescript-loader"),
11-
options: {
12-
configFileName: "./tsconfig.json"
13-
}
14-
}
15-
]
16-
});
17-
config.resolve.extensions.push(".ts", ".tsx");
18-
return config;
5+
config.module.rules.push({
6+
test: /\.(ts|tsx)$/,
7+
include: [SRC_PATH],
8+
use: [
9+
{
10+
loader: require.resolve('awesome-typescript-loader'),
11+
options: {
12+
configFileName: './tsconfig.json',
13+
},
14+
},
15+
],
16+
});
17+
config.resolve.extensions.push('.ts', '.tsx');
18+
return config;
1919
};

0 commit comments

Comments
 (0)