Skip to content

Commit 6012dad

Browse files
committed
chore: upgrade dependencies and integrate prettier
1 parent e564868 commit 6012dad

14 files changed

+4354
-3752
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist

.eslintrc

Lines changed: 51 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,70 @@
11
{
22
"parser": "@typescript-eslint/parser",
3-
"extends": [
4-
"plugin:@typescript-eslint/recommended",
5-
"airbnb"
6-
],
7-
"plugins": ["@typescript-eslint"],
3+
"parserOptions": {
4+
"ecmaFeatures": {
5+
"jsx": true
6+
},
7+
"sourceType": "module",
8+
"useJSXTextNode": true
9+
},
10+
"extends": ["airbnb", "airbnb/hooks", "plugin:@typescript-eslint/recommended", "prettier"],
11+
"plugins": ["prettier", "@typescript-eslint"],
812
"settings": {
913
"import/resolver": {
1014
"node": {
11-
"extensions": [
12-
".js",
13-
".jsx",
14-
".ts",
15-
".tsx"
16-
]
15+
"extensions": [".js", ".jsx", ".ts", ".tsx"]
1716
}
1817
}
1918
},
2019
"rules": {
20+
"prettier/prettier": ["error"],
2121
"class-methods-use-this": "off",
2222
"lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
23-
"import/extensions": ["error", "ignorePackages", {
24-
"js": "never",
25-
"mjs": "never",
26-
"jsx": "never",
27-
"ts": "never",
28-
"tsx": "never"
29-
}],
30-
"import/no-extraneous-dependencies": ["error", { "devDependencies": true, "peerDependencies": true }],
23+
"no-use-before-define": "off",
24+
"no-unused-expressions": "off",
25+
"import/extensions": [
26+
"error",
27+
"ignorePackages",
28+
{
29+
"js": "never",
30+
"mjs": "never",
31+
"jsx": "never",
32+
"ts": "never",
33+
"tsx": "never"
34+
}
35+
],
36+
"import/prefer-default-export": "off",
3137
"react/jsx-filename-extension": ["error", { "extensions": [".jsx", ".tsx"] }],
32-
"react/require-default-props": "off",
33-
"react/static-property-placement": ["error", "static public field"],
34-
"@typescript-eslint/explicit-function-return-type": "off",
38+
"react/jsx-one-expression-per-line": "off",
39+
"react/jsx-props-no-spreading": "off",
40+
"@typescript-eslint/camelcase": "off",
41+
"@typescript-eslint/indent": "off",
42+
"@typescript-eslint/no-explicit-any": "off",
3543
"@typescript-eslint/no-unused-vars": ["error", { "ignoreRestSiblings": true }]
3644
},
3745
"overrides": [
3846
{
39-
"files": ["*.test.ts", "*.test.tsx"],
40-
"env": { "jest": true, "node": true }
47+
"files": ["*.ts", "*.tsx"],
48+
"rules": {
49+
"react/prop-types": "off",
50+
"react/require-default-props": "off"
51+
}
52+
},
53+
{
54+
"files": ["test/**/*.*", "*.test.*", "**/__mocks__/**/*.*"],
55+
"env": {
56+
"jest": true
57+
},
58+
"rules": {
59+
"no-underscore-dangle": "off",
60+
"no-unused-expressions": "off",
61+
"no-unused-vars": "off",
62+
"import/no-extraneous-dependencies": "off",
63+
"@typescript-eslint/ban-ts-ignore": "off",
64+
"@typescript-eslint/no-empty-function": "off",
65+
"@typescript-eslint/no-non-null-assertion": "off",
66+
"@typescript-eslint/no-unused-vars": "off"
67+
}
4168
}
4269
]
4370
}

.pretterignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.eslintignore

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "all",
4+
"singleQuote": true,
5+
"printWidth": 100,
6+
"tabWidth": 2
7+
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2016-2020 Josh Swan
1+
Copyright (c) 2016-2021 Josh Swan
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)