Skip to content

Commit

Permalink
fix: prettier issues and tsc
Browse files Browse the repository at this point in the history
  • Loading branch information
pstachula-dev committed Jul 7, 2024
1 parent 464ffc5 commit 2a79763
Show file tree
Hide file tree
Showing 31 changed files with 2,730 additions and 476 deletions.
69 changes: 59 additions & 10 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,22 +1,71 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
parser: '@typescript-eslint/parser',
plugins: ['react-refresh', '@typescript-eslint/eslint-plugin'],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
'airbnb',
'airbnb-typescript',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'prettier',
],
parserOptions: {
sourceType: "module",
project: ["./tsconfig.json"],
sourceType: 'module',
project: ['./tsconfig.json'],
},
ignorePatterns: ["dist", ".eslintrc.cjs"],
parser: "@typescript-eslint/parser",
plugins: ["react-refresh", "@typescript-eslint/eslint-plugin"],
ignorePatterns: ['dist', 'vite.*.ts'],
rules: {
"react-refresh/only-export-components": [
"warn",
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'promise/always-return': 'off',
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': 'off',
'import/extensions': 'off',
},
overrides: [
{
files: ['*.ts', '*.tsx'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'react/no-array-index-key': 'off',
'react/jsx-props-no-spreading': 'off',
'react/require-default-props': 'off',
'react/prop-types': 'off',
'@typescript-eslint/no-unsafe-enum-comparison': 'off',
'react/function-component-definition': 'off',
'react/react-in-jsx-scope': 'off',
'arrow-body-style': 'off',
'no-restricted-syntax': 'off',
'@typescript-eslint/dot-notation': 'off',
'@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/no-use-before-define': 'off',
},
},
{
files: ['*.js'],
rules: {
'global-require': 'off',
},
},
],
};
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Main flow
on:
push:
branches:
- "*"
- '*'

jobs:
linters:
Expand All @@ -14,7 +14,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 20
cache: "npm"
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm run format:ci
Expand Down
36 changes: 36 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Node artifact files
node_modules/
dist/
coverage/
storybook-static/

# Log files
*.log

# IDE
.idea/
.vscode/

# Unit test reports
TEST*.xml
junit.xml
test-results
tsconfig.tsbuildinfo
coverage/

# Generated by MacOS
.DS_Store

.yarn
.yarnrc
.next
.env
.turbo

# Cache
.eslintcache

build/

.adminjs
pnpm-lock.yaml
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"plugins": ["prettier-plugin-tailwindcss"]
}
Loading

0 comments on commit 2a79763

Please sign in to comment.