-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the template according to changes in sdk@2,
- Loading branch information
Showing
26 changed files
with
2,124 additions
and
2,990 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,33 @@ | ||
function regexp(regex) { | ||
return [ | ||
new RegExp(regex.source + '.*[^\\u0000]$').source, | ||
regex.source, | ||
]; | ||
} | ||
|
||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true | ||
}, | ||
extends: [ | ||
'airbnb-base', | ||
'airbnb-typescript/base', | ||
'plugin:solid/typescript', | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:solid/typescript' | ||
], | ||
overrides: [ | ||
{ | ||
env: { | ||
node: true | ||
}, | ||
files: [ | ||
'.eslintrc.{js,cjs}' | ||
], | ||
parserOptions: { | ||
sourceType: 'script' | ||
} | ||
} | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: './tsconfig.json', | ||
sourceType: 'module', | ||
ecmaVersion: 'latest', | ||
sourceType: 'module' | ||
}, | ||
plugins: ['solid', 'simple-import-sort'], | ||
rules: { | ||
'@typescript-eslint/consistent-type-imports': 'error', | ||
'@typescript-eslint/indent': 0, | ||
// 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 | ||
regexp(/^node:/), | ||
|
||
// Packages. | ||
// solid-js | ||
regexp(/^@?\w/), | ||
|
||
// Tsconfig alias. | ||
// ~/helpers | ||
regexp(/^~\//), | ||
|
||
// Parent imports. | ||
// ../Typography.js | ||
regexp(/^\.\.\//), | ||
|
||
// Current folder imports. | ||
// ./utils.js | ||
regexp(/^\.\/.+\.(?!s?css)/), | ||
|
||
// Styles. | ||
// ./Typography.css | ||
[/\.css$/.source], | ||
], | ||
}], | ||
}, | ||
plugins: [ | ||
'@typescript-eslint' | ||
], | ||
rules: {} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 + TS</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.tsx" type="module"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.