Skip to content

Commit

Permalink
chore: Migrate to tailwind
Browse files Browse the repository at this point in the history
  • Loading branch information
Betree committed Jan 23, 2025
1 parent 1bb8afc commit 49b0fea
Show file tree
Hide file tree
Showing 381 changed files with 15,368 additions and 19,113 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react"],
"presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript"],
"plugins": [
["babel-plugin-wildcard", { "exts": ["json"], "nostrip": true, "noModifyCase": true }],
[
Expand Down
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
.vscode
.eslintrc.yml
.gitignore
.sass-lint.yml
.travis.yml

node_modules
Expand Down
131 changes: 48 additions & 83 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,116 +11,81 @@ ignorePatterns:
extends:
- 'eslint:recommended'
- 'plugin:react/recommended'
parser: '@babel/eslint-parser'
- 'plugin:@typescript-eslint/recommended' # Add TypeScript rules
- 'plugin:import/errors'
- 'plugin:import/warnings'
- 'plugin:import/typescript' # Import plugin with TypeScript support
- 'plugin:jsx-a11y/recommended'
- 'prettier' # If you use Prettier
parser: '@typescript-eslint/parser' # Use the TypeScript parser
parserOptions:
ecmaFeatures:
experimentalObjectRestSpread: true
jsx: true
legacyDecorators: true
sourceType: module
project: './tsconfig.json' # Required for full TypeScript support
plugins:
- react
- jsx-a11y
- import
- '@typescript-eslint'
- simple-import-sort
- cypress
- chai-friendly # See https://github.com/cypress-io/eslint-plugin-cypress#chai-and-no-unused-expressions
- chai-friendly
settings:
react:
version: detect
import/resolver:
typescript: {}
node:
extensions:
- .js
- .jsx
- .ts
- .tsx
paths:
- src
rules:
# Base rules
linebreak-style: ['error', 'unix']
quotes: ['warn', 'single', { avoidEscape: true }]
semi: ['error', 'never']
import/first: ['warn']
simple-import-sort/imports: ['error']
no-else-return: off
no-trailing-spaces: ['warn']
no-continue: off
no-plusplus: off
radix: off
eol-last: ['warn']
no-console: ['error']
prefer-const: ['warn']
no-restricted-globals: ['error', 'event', 'fdescribe']
no-mixed-operators: ['warn']
# See https://github.com/cypress-io/eslint-plugin-cypress#chai-and-no-unused-expressions
no-unused-expressions: 0
chai-friendly/no-unused-expressions: 2
# React
curly: ['error']
import/no-named-as-default-member: ['off']

# Import sorting
simple-import-sort/imports: ['error']
import/first: ['warn']

# TypeScript-specific rules
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }]
'@typescript-eslint/no-explicit-any': ['warn']
'@typescript-eslint/explicit-function-return-type': ['off']
'@typescript-eslint/no-empty-function': ['warn']

# React rules
react/display-name: ['warn']
react/destructuring-assignment: off
react/jsx-indent-props: ['warn', 2]
react/jsx-first-prop-new-line: ['warn']
react/jsx-closing-bracket-location: ['warn']
react/jsx-curly-spacing: ['warn']
react/jsx-tag-spacing: ['warn', { beforeSelfClosing: 'allow' }]
react/jsx-wrap-multilines: ['warn']
react/no-unused-state: ['warn']
react/jsx-max-props-per-line: ['warn', { when: 'multiline' }]
react/jsx-closing-tag-location: ['warn']
react/no-unescaped-entities: ['warn']
react/no-unused-prop-types: ['warn']
react/self-closing-comp: ['warn']
react/jsx-indent: ['warn', 2]
react/jsx-max-props-per-line: ['warn', { when: 'multiline' }]
react/no-array-index-key: ['warn']
react/prefer-stateless-function: off
react/forbid-prop-types: off
# JSX
react/prop-types: ['off']

# Accessibility rules
jsx-a11y/anchor-is-valid:
- warn
- components: ['Link']
specialLink: ['To']
jsx-a11y/alt-text: ['warn']
jsx-a11y/label-has-for: ['warn']
jsx-a11y/label-has-associated-control:
- warn
- controlComponents:
- 'Field'
jsx-a11y/click-events-have-key-events: ['warn']
jsx-a11y/no-static-element-interactions: ['warn']
specialLink: ['to']
jsx-a11y/label-has-associated-control: ['warn']
jsx-a11y/media-has-caption: ['warn']
jsx-a11y/accessible-emoji: ['warn']
jsx-a11y/anchor-has-content: off
no-console: ['error']
curly: ['error']

# Following rule haves been disabled for compatibility with
# existing code. Some of them should be re-activated in the future.
no-shadow: off
nonblock-statement-body-position: off
object-curly-spacing: off
object-curly-newline: off
object-property-newline: off
comma-dangle: off
function-paren-newline: off
arrow-parens: off
arrow-body-style: off
no-use-before-define: off
no-param-reassign: off
camelcase: off
no-underscore-dangle: off
no-restricted-syntax: off
prefer-destructuring: off
consistent-return: off
class-methods-use-this: off
prefer-promise-reject-errors: off
import/prefer-default-export: off
import/export: off
block-spacing: off
brace-style: off
no-multi-spaces: off
max-len: off # Handled by prettier
# React-specific temporarily disabled rules
react/prop-types: off
react/no-string-refs: off
react/react-in-jsx-scope: off # Generates erros in tests
react/sort-comp: off
react/require-default-props: off
react/jsx-one-expression-per-line: off
react/jsx-no-bind: off
react/no-unescaped-entities: ['warn']

overrides:
- files: ['**/__tests__/**/*.[jt]s?(x)', '**/*.test.[jt]s?(x)', '**/*.spec.[jt]s?(x)']
rules:
react/react-in-jsx-scope: 'off'
'@typescript-eslint/no-unused-expressions': 'off'
globals:
# For tests
snapshot: false
snapshotReducer: false
snapshotComponent: false
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,30 @@ jobs:
run: CYPRESS_INSTALL_BINARY=0 npm ci
- run: npm run prettier:check

typescript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v3
with:
node-version-file: '.tool-versions'
cache: 'npm'
- name: Install dependencies
run: CYPRESS_INSTALL_BINARY=0 npm ci
- run: npm run typescript

unused-exports:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v3
with:
node-version-file: '.tool-versions'
cache: 'npm'
- name: Install dependencies
run: CYPRESS_INSTALL_BINARY=0 npm ci
- run: npm run ts-unused-exports

test:
name: Unit tests
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*.swp
*.vi
*~
*.sass-cache

# OS or Editor folders
.DS_Store
Expand Down
95 changes: 0 additions & 95 deletions .sass-lint.yml

This file was deleted.

Loading

0 comments on commit 49b0fea

Please sign in to comment.