Skip to content

Commit

Permalink
add eslint + prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
sorokin0andrey committed Nov 15, 2022
1 parent 0012de4 commit 9d9692e
Show file tree
Hide file tree
Showing 32 changed files with 1,061 additions and 722 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
docs
config
21 changes: 21 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
},
extends: ['plugin:react/recommended', 'plugin:prettier/recommended'],
parser: '@typescript-eslint/parser',
plugins: ['react', 'react-hooks', '@typescript-eslint'],
ignorePatterns: ['./docs/*'],
overrides: [],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
settings: {
react: {
version: 'detect',
},
},
};
14 changes: 14 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
semi: true,
tabWidth: 2,
useTabs: true,
printWidth: 120,
singleQuote: true,
proseWrap: 'never',
trailingComma: 'all',
arrowParens: 'always',
importOrder: ['<THIRD_PARTY_MODULES>', '^@/(.*)$', '^../(.*)', '^./(.*)'],
importOrderSortSpecifiers: true,
importOrderCaseInsensitive: true,
importOrderGroupNamespaceSpecifiers: true,
};
12 changes: 6 additions & 6 deletions docs/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"files": {
"main.css": "/demo-dapp/static/css/main.82265efa.css",
"main.js": "/demo-dapp/static/js/main.888dd217.js",
"main.css": "/demo-dapp/static/css/main.03aeaaea.css",
"main.js": "/demo-dapp/static/js/main.cf21a117.js",
"index.html": "/demo-dapp/index.html",
"main.82265efa.css.map": "/demo-dapp/static/css/main.82265efa.css.map",
"main.888dd217.js.map": "/demo-dapp/static/js/main.888dd217.js.map"
"main.03aeaaea.css.map": "/demo-dapp/static/css/main.03aeaaea.css.map",
"main.cf21a117.js.map": "/demo-dapp/static/js/main.cf21a117.js.map"
},
"entrypoints": [
"static/css/main.82265efa.css",
"static/js/main.888dd217.js"
"static/css/main.03aeaaea.css",
"static/js/main.cf21a117.js"
]
}
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/demo-dapp/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Example of a dapp that connects to the wallet via ton-connect v2"/><title>Demo Dapp</title><script defer="defer" src="/demo-dapp/static/js/main.888dd217.js"></script><link href="/demo-dapp/static/css/main.82265efa.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/demo-dapp/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Example of a dapp that connects to the wallet via ton-connect v2"/><title>Demo Dapp</title><script defer="defer" src="/demo-dapp/static/js/main.cf21a117.js"></script><link href="/demo-dapp/static/css/main.03aeaaea.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/css/main.03aeaaea.css.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/static/css/main.82265efa.css.map

This file was deleted.

Large diffs are not rendered by default.

File renamed without changes.

Large diffs are not rendered by default.

17 changes: 13 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"css-minimizer-webpack-plugin": "^3.2.0",
"dotenv": "^10.0.0",
"dotenv-expand": "^5.1.0",
"eslint": "^8.3.0",
"eslint": "^8.0.1",
"eslint-config-react-app": "^7.0.1",
"eslint-webpack-plugin": "^3.1.1",
"file-loader": "^6.2.0",
Expand Down Expand Up @@ -63,19 +63,28 @@
"tailwindcss": "^3.0.2",
"terser-webpack-plugin": "^5.2.5",
"tonweb": "^0.0.58",
"typescript": "^4.4.2",
"typescript": "*",
"web-vitals": "^2.1.0",
"webpack": "^5.64.4",
"webpack-dev-server": "^4.6.0",
"webpack-manifest-plugin": "^4.0.2",
"workbox-webpack-plugin": "^6.4.1"
},
"devDependencies": {},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^3.4.0",
"@typescript-eslint/eslint-plugin": "^5.43.0",
"@typescript-eslint/parser": "^5.43.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.31.10",
"prettier": "^2.7.1"
},
"homepage": "https://ton-connect.github.io/demo-dapp/",
"scripts": {
"start": "node scripts/start.js",
"build": "BUILD_PATH='./docs' node scripts/build.js",
"test": "node scripts/test.js"
"test": "node scripts/test.js",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
},
"eslintConfig": {
"extends": [
Expand Down
Loading

0 comments on commit 9d9692e

Please sign in to comment.