Skip to content

Commit

Permalink
Update the template
Browse files Browse the repository at this point in the history
  • Loading branch information
heyqbnk committed May 13, 2024
1 parent d2ef905 commit 9ae960e
Show file tree
Hide file tree
Showing 26 changed files with 2,734 additions and 3,502 deletions.
97 changes: 24 additions & 73 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,85 +1,36 @@
module.exports = {
env: {
browser: true,
es2021: true
},
extends: [
'airbnb-base',
'plugin:solid/recommended',
'eslint:recommended',
'plugin:solid/recommended'
],
overrides: [
{
env: {
node: true
},
files: [
'.eslintrc.{js,cjs}'
],
parserOptions: {
sourceType: 'script'
}
}
],
plugins: ['solid', 'simple-import-sort'],
parser: '@babel/eslint-parser',
parserOptions: {
requireConfigFile: false,
babelOptions: {
babelrc: false,
configFile: false,
presets: ['@babel/preset-env', 'babel-preset-solid'],
presets: ['@babel/preset-env', '@babel/preset-react'],
},
},
rules: {
// Sometimes this rule decreases readability.
'arrow-body-style': 0,
'consistent-return': 0,
'function-paren-newline': 0,

// We use special module resolution, that's why we need extensions.
'import/extensions': 0,
'import/first': 'error',
'import/newline-after-import': 'error',
// It's okay to use cycle imports.
'import/no-cycle': 0,
'import/no-duplicates': 'error',
'import/no-empty-named-blocks': 'error',
'import/no-mutable-exports': 0,
'import/no-self-import': 'error',
'import/no-unresolved': 0,
'import/order': 0,

// We don't use default exports anywhere.
'import/prefer-default-export': 0,

'linebreak-style': 0,
'no-await-in-loop': 0,
'no-console': 0,
'no-continue': 0,
'no-multiple-empty-lines': ['error', {
max: 1,
maxEOF: 1,
maxBOF: 0,
}],
'no-nested-ternary': 0,
'no-void': 0,
'no-duplicate-imports': 0,
'object-curly-newline': ['error', { consistent: true }],

'operator-linebreak': 0,

// Simple sort.
// https://github.com/lydell/eslint-plugin-simple-import-sort?tab=readme-ov-file#custom-grouping
'simple-import-sort/exports': 'error',
'simple-import-sort/imports': ['error', {
groups: [
// Node.js builtins prefixed with `node:`.
// node:fs
[/^node:/.source],

// Packages.
// solid-js
[/^@?\w/.source],

// Jsconfig alias.
// ~/helpers
[/^~\//.source],

// Parent imports.
// ../Typography.js
[/^\.\.\//.source],

// Current folder imports.
// ./utils.js
[/^\.\/.+\.(?!s?css)/.source],

// Styles.
// ./Typography.css
[/\.css$/.source],
],
}],
},
plugins: [
'solid'
],
rules: {}
};
15 changes: 10 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<title>Solid App</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="theme-color" content="#000000"/>
<title>Vite + Solid + JS</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
rel="stylesheet"
>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>

<script src="/src/index.jsx" type="module"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"module": "ESNext",
"moduleResolution": "bundler",
"paths": {
"~/*": [
"@/*": [
"./src/*"
]
},
Expand Down
21 changes: 9 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,23 @@
"access": "public"
},
"dependencies": {
"@solidjs/router": "^0.13.1",
"@tma.js/sdk": "^1.5.1",
"@tma.js/sdk-solid": "^2.0.1",
"@tonconnect/ui": "^2.0.0",
"@solidjs/router": "^0.13.3",
"@tma.js/sdk-solid": "^2.1.0",
"@tma.js/solid-router-integration": "^2.0.0",
"@tonconnect/ui": "^2.0.2",
"eruda": "^3.0.1",
"solid-js": "^1.8.16"
"solid-js": "^1.8.17"
},
"devDependencies": {
"@babel/core": "^7.24.4",
"@babel/eslint-parser": "^7.24.1",
"@babel/preset-env": "^7.24.4",
"babel-preset-solid": "^1.8.16",
"eslint": "^8.0.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-simple-import-sort": "^12.0.0",
"eslint-plugin-solid": "^0.13.2",
"babel-preset-solid": "^1.8.17",
"eslint": "^8.57.0",
"eslint-plugin-solid": "^0.14.0",
"gh-pages": "^6.1.1",
"solid-devtools": "^0.30.1",
"vite": "^5.2.8",
"vite": "^5.2.11",
"vite-plugin-solid": "^2.10.2"
}
}
Loading

0 comments on commit 9ae960e

Please sign in to comment.