Skip to content

Commit

Permalink
Merge pull request #43 from eruptionjs/rc/1.7
Browse files Browse the repository at this point in the history
release candidate: v1.7
  • Loading branch information
devmozao authored Nov 17, 2023
2 parents 363b6ee + 51212f4 commit 44e247b
Show file tree
Hide file tree
Showing 15 changed files with 1,049 additions and 786 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules
dist
coverage
.eslintcache
.eslintrc.cjs
61 changes: 0 additions & 61 deletions .eslintrc

This file was deleted.

81 changes: 81 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/* eslint-env node */
module.exports = {
root: true,
env: {
browser: true,
},
extends: [
'eslint:recommended',
'plugin:import/typescript',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/strict',
'plugin:react/jsx-runtime',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/stylistic',
'plugin:prettier/recommended',
'prettier',
],
settings: {
react: {
version: 'detect',
},
},
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
plugins: [
'react',
'@typescript-eslint',
'import',
'jsx-a11y',
'react-hooks',
'react-refresh',
'prettier',
],
rules: {
'no-var': 'error',
'no-alert': 'error',
'no-console': 'error',
'prefer-const': 'error',
// "prefer-destructuring": "error",

'import/no-duplicates': 'error',
'import/no-self-import': 'error',
'import/no-relative-packages': 'error',
'import/no-relative-parent-imports': 'error',
'import/consistent-type-specifier-style': ['error', 'prefer-inline'],
'import/no-empty-named-blocks': 'error',
'import/no-extraneous-dependencies': 'error',
'import/no-import-module-exports': 'error',
'import/newline-after-import': 'error',
'import/group-exports': 'error',
'import/exports-last': 'error',
'import/no-useless-path-segments': ['error', { noUselessIndex: true }],

'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-non-null-assertion': 'error',
'@typescript-eslint/no-unused-vars': 'error',

'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',

'prettier/prettier': [
'warn',
{
endOfLine: 'lf',
singleQuote: true,
},
],

'react-refresh/only-export-components': ['error', { allowConstantExport: true }],
},
}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['16.x', '18.x']
node: ['20.x']
os: [ubuntu-latest]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"*.{html,md,json,jsonc}": ["npm run prettier:fix"],
"*.{ts,tsx}": ["npm run prettier:fix", "npm run lint:fix"],
"*.{ts,tsx,js,jsx}": ["npm run prettier:fix", "npm run lint:fix"],
"*.css": ["npm run lint:css"]
}
11 changes: 8 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/icons/favicon.svg" />
Expand All @@ -11,6 +10,12 @@
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>

<!-- disables react devtools -->
<script type="module">
if (!window.location.port && typeof window.__REACT_DEVTOOLS_GLOBAL_HOOK__ === 'object') {
window.__REACT_DEVTOOLS_GLOBAL_HOOK__.inject = function () {}
}
</script>
</body>
</html>
Loading

0 comments on commit 44e247b

Please sign in to comment.