-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from crisanlucid/feature/tools-dev-improvement
feat: Tools improvement
- Loading branch information
Showing
14 changed files
with
3,366 additions
and
95 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 |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/* eslint-env node */ | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call | ||
require("@rushstack/eslint-patch/modern-module-resolution"); | ||
|
||
module.exports = { | ||
root: true, | ||
extends: [ | ||
"plugin:vitest-globals/recommended", | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:jsx-a11y/recommended", | ||
"plugin:react-hooks/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
"prettier", | ||
], | ||
settings: { | ||
react: { | ||
version: "detect", | ||
}, | ||
"import/parsers": { | ||
"@typescript-eslint/parser": [".ts", ".tsx"], | ||
}, | ||
"import/resolver": { | ||
typescript: { | ||
alwaysTryTypes: true, | ||
}, | ||
}, | ||
}, | ||
env: { | ||
browser: true, | ||
es2022: true, | ||
es6: true, | ||
"vitest-globals/env": true, | ||
"cypress/globals": true, | ||
}, | ||
overrides: [ | ||
{ | ||
files: ["cypress/e2e/**.{cy,spec}.{js,ts,jsx,tsx}"], | ||
extends: ["plugin:cypress/recommended"], | ||
}, | ||
{ | ||
files: ["*.tsx, *.jsx"], | ||
rules: { | ||
"@typescript-eslint/ban-types": [ | ||
"error", | ||
{ | ||
extendDefaults: true, | ||
types: { | ||
"{}": false, | ||
}, | ||
}, | ||
], | ||
"no-unused-expressions": "off", | ||
}, | ||
}, | ||
{ | ||
files: ["*.ts", "*.tsx"], | ||
rules: { | ||
"no-undef": "off", | ||
"@typescript-eslint/no-misused-promises": "off", | ||
}, | ||
}, | ||
], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
project: "tsconfig.json", | ||
}, | ||
plugins: ["react", "import", "jsx-a11y", "@typescript-eslint", "cypress"], | ||
rules: { | ||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off", | ||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", | ||
"no-unused-vars": "off", | ||
"no-undef": process.env.NODE_ENV === "production" ? "warn" : "error", | ||
"no-unreachable": process.env.NODE_ENV === "production" ? "warn" : "error", | ||
"react/react-in-jsx-scope": "off", | ||
"@typescript-eslint/no-unused-vars": | ||
process.env.NODE_ENV === "production" ? "warn" : "error", | ||
"react/prop-types": 0, | ||
"react/react-in-jsx-scope": 0, | ||
"@typescript-eslint/no-empty-function": 0, | ||
}, | ||
}; |
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
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,6 +1,23 @@ | ||
module.exports = { | ||
plugins: { | ||
tailwindcss: {}, | ||
"postcss-flexbugs-fixes": {}, | ||
stylelint: { | ||
configFile: "stylelint.config.js", | ||
}, | ||
"postcss-import": {}, | ||
"postcss-extend": {}, | ||
"postcss-mixins": {}, | ||
"postcss-nested": {}, | ||
"postcss-preset-env": { | ||
autoprefixer: { flexbox: "no-2009" }, | ||
stage: 3, | ||
features: { | ||
"custom-properties": false, | ||
"nesting-rules": false, | ||
}, | ||
}, | ||
autoprefixer: {}, | ||
"postcss-reporter": {}, | ||
}, | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* eslint-env node */ | ||
module.exports = { | ||
endOfLine: 'lf', | ||
jsxSingleQuote: true, | ||
printWidth: 100, | ||
proseWrap: 'never', | ||
quoteProps: 'as-needed', | ||
semi: true, | ||
singleQuote: true, | ||
tabWidth: 2, | ||
trailingComma: 'es5', | ||
useTabs: false, | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* eslint-env node */ | ||
module.exports = { | ||
endOfLine: 'lf', | ||
jsxSingleQuote: true, | ||
printWidth: 100, | ||
proseWrap: 'never', | ||
quoteProps: 'as-needed', | ||
semi: true, | ||
singleQuote: true, | ||
tabWidth: 2, | ||
trailingComma: 'es5', | ||
useTabs: false, | ||
}; |
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
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
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
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,10 +1,15 @@ | ||
import React from 'react' | ||
import ReactDOM from 'react-dom/client' | ||
import App from './App' | ||
import './index.css' | ||
import { StrictMode } from "react"; | ||
import { createRoot } from "react-dom/client"; | ||
import App from "./App"; | ||
import "./index.css"; | ||
|
||
ReactDOM.createRoot(document.getElementById('root')!).render( | ||
<React.StrictMode> | ||
const container = document.getElementById("root"); | ||
if (!container) throw new Error("no container to render to"); | ||
|
||
const root = createRoot(container); | ||
|
||
root.render( | ||
<StrictMode> | ||
<App /> | ||
</React.StrictMode> | ||
) | ||
</StrictMode> | ||
); |
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
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
module.exports = { | ||
extends: [ | ||
"stylelint-config-standard", | ||
"stylelint-config-recess-order", | ||
"stylelint-config-css-modules", | ||
"stylelint-config-prettier", | ||
], | ||
ignoreFiles: [ | ||
"./node_modules/**/*.css", | ||
"./dist/**/*.css", | ||
"./coverage/**/*.css", | ||
], | ||
rules: { | ||
"at-rule-no-unknown": [ | ||
true, | ||
{ | ||
ignoreAtRules: [ | ||
"tailwind", | ||
"apply", | ||
"screen", | ||
"variants", | ||
"responsive", | ||
], | ||
}, | ||
], | ||
"no-duplicate-selectors": null, | ||
"no-empty-source": null, | ||
"rule-empty-line-before": null, | ||
"comment-empty-line-before": null, | ||
"selector-pseudo-element-no-unknown": null, | ||
"declaration-block-trailing-semicolon": null, | ||
"no-descending-specificity": null, | ||
"string-no-newline": null, | ||
// Limit the number of universal selectors in a selector, | ||
// to avoid very slow selectors | ||
"selector-max-universal": 1, | ||
"selector-class-pattern": "^[a-z][a-zA-Z0-9]+$", | ||
}, | ||
}; |
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,34 +1,40 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
const colors = require('tailwindcss/colors'); | ||
|
||
module.exports = { | ||
content: ["./src/**/*.{js,jsx,ts,tsx}", "./public/index.html"], | ||
mode: "jit", | ||
content: ['./src/**/*.{js,jsx,ts,tsx}', './public/index.html'], | ||
mode: 'jit', | ||
theme: { | ||
fontFamily: { | ||
display: ["Open Sans", "sans-serif"], | ||
body: ["Open Sans", "sans-serif"], | ||
display: ['Open Sans', 'sans-serif'], | ||
body: ['Open Sans', 'sans-serif'], | ||
}, | ||
extend: { | ||
colors: { | ||
...colors, | ||
}, | ||
screens: { | ||
mf: "990px", | ||
mf: '990px', | ||
}, | ||
keyframes: { | ||
"slide-in": { | ||
"0%": { | ||
"-webkit-transform": "translateX(120%)", | ||
transform: "translateX(120%)", | ||
'slide-in': { | ||
'0%': { | ||
'-webkit-transform': 'translateX(120%)', | ||
transform: 'translateX(120%)', | ||
}, | ||
"100%": { | ||
"-webkit-transform": "translateX(0%)", | ||
transform: "translateX(0%)", | ||
'100%': { | ||
'-webkit-transform': 'translateX(0%)', | ||
transform: 'translateX(0%)', | ||
}, | ||
}, | ||
}, | ||
animation: { | ||
"slide-in": "slide-in 0.5s ease-out", | ||
'slide-in': 'slide-in 0.5s ease-out', | ||
}, | ||
}, | ||
}, | ||
variants: { | ||
extend: {}, | ||
}, | ||
plugins: [], | ||
plugins: ['@tailwindcss/forms'], | ||
}; |
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.