Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a3b2d1d
feat: esling, prettier configured
joshi-kaushal Aug 19, 2022
0546fab
feat: husky configured - 5
joshi-kaushal Aug 19, 2022
64177e5
feat: husky configured - 6
joshi-kaushal Aug 19, 2022
ff09b4a
fix: added prettier and lint commands and removed parser from prettierrc
joshi-kaushal Aug 19, 2022
df26afc
fix: added format script and fixed lint+prettier scripts
joshi-kaushal Aug 19, 2022
c0df783
fix: added jsx-runtime
joshi-kaushal Aug 19, 2022
9bc5c01
Merge branch 'main' into feat/lint
joshi-kaushal Aug 19, 2022
fe700e0
Merge branch 'main' into feat/lint
joshi-kaushal Aug 31, 2022
ec62910
Merge branch 'main' into feat/lint
koustov Sep 1, 2022
a988f53
Merge branch 'main' into feat/lint
joshi-kaushal Sep 5, 2022
9763131
Merge branch 'main' into feat/lint
Angryman18 Oct 12, 2022
3ab25f8
fix: added jsx-runtime plugin
joshi-kaushal Oct 17, 2022
056975f
Merge branch 'feat/lint' of github.com:reactplay/react-play into feat…
joshi-kaushal Oct 17, 2022
a505770
fix: removed husky temporarily
joshi-kaushal Nov 8, 2022
8135020
Update eslint and prettier
Sachin-chaurasiya Nov 15, 2022
5ece7a5
Merge branch 'main' into feat/lint
Sachin-chaurasiya Nov 15, 2022
d32de2e
Update scripts
Sachin-chaurasiya Nov 15, 2022
b089eee
Add missing dependency
Sachin-chaurasiya Nov 15, 2022
d74decf
Change rule from error to warn
Sachin-chaurasiya Nov 19, 2022
4098014
Merge branch 'main' into feat/lint
Sachin-chaurasiya Nov 19, 2022
6ebe805
Update the script config
Sachin-chaurasiya Nov 19, 2022
49c5e0a
Merge branch 'main' into feat/lint
Sachin-chaurasiya Nov 24, 2022
640ddd1
Merge branch 'main' into feat/lint
Sachin-chaurasiya Nov 24, 2022
9a24519
Merge branch 'feat/lint' of https://github.com/reactplay/react-play i…
Sachin-chaurasiya Nov 24, 2022
1fd1dba
Format code files with prettier
Sachin-chaurasiya Nov 25, 2022
c469a89
Revert "Format code files with prettier"
Sachin-chaurasiya Nov 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
node_modules
.github
.build;
package-lock.json;
package.json;
yarn.lock;
tailwind.config.js;
tsconfig.json;
postcss.config.js;
Dockerfile.DEV;
Dockerfile.PROD;
75 changes: 75 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"env": {
"browser": true,
"node": true,
"es2021": true,
"jest": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react", "react-hooks", "@typescript-eslint", "prettier"],
"rules": {
"import/extensions": 0,

"import/no-named-as-default-member": 0,
"react/prop-types": 0,
"react/display-name": 0,
"react/react-in-jsx-scope": 0,

// Require a whitespace at the beginning of a comment
"spaced-comment": ["warn", "always"],

// Maximum line length for comments
// Trailing comments allowed beyond maximum line length
"max-len": ["warn", { "code": 400, "comments": 100, "ignoreTrailingComments": true }],

// Require PascalCase for user-defined JSX components
"react/jsx-pascal-case": ["warn"],

// Console logs cannot be committed.
"no-console": ["warn"],

// Require props to be sorted
"react/jsx-sort-props": ["warn", { "callbacksLast": true, "shorthandFirst": true }],

// Omit boolean prop value when set to true
"react/jsx-boolean-value": ["warn", "never"],

// Require self closing tags in JSX/HTML
"react/self-closing-comp": ["warn", { "component": true, "html": true }],

// Disallow unnecessary curly braces in JSX
"react/jsx-curly-brace-presence": ["warn", "never"],

// Require blank line before certain statements
"padding-line-between-statements": [
"warn",
{ "blankLine": "always", "prev": "*", "next": "function" },
{ "blankLine": "always", "prev": "*", "next": "class" },
{ "blankLine": "always", "prev": "*", "next": "export" },
// Ignore consecutive export statements
{ "blankLine": "any", "prev": "export", "next": "export" },
{ "blankLine": "always", "prev": "*", "next": "return" },
{ "blankLine": "always", "prev": "*", "next": "break" },
{ "blankLine": "always", "prev": "*", "next": "continue" },
{ "blankLine": "always", "prev": "*", "next": "throw" }
]
},
"settings": {
"react": {
"version": "detect"
}
}
}
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"tabWidth": 2,
"printWidth": 100,
"singleQuote": true,
"trailingComma": "none"
}
22 changes: 16 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,13 @@
"snap": "react-snap",
"test": "react-scripts test",
"eject": "react-scripts eject",
"prettier": "prettier --write \"**/*.+(js|jsx|ts|tsx|json|css|scss|md)\"",
"lint": "eslint \"**/*.+(js|jsx|ts|tsx|json|css|scss|md)\"",
"lint:fix": "eslint --fix \"**/*.+(js|jsx|ts|tsx|json|css|scss|md)\"",
"format": "prettier --write \"**/*.+(js|jsx|ts|tsx|json|css|scss|md)\" --config ./.prettierrc",
"cypress:open": "cypress open",
"cypress:run": "cypress run"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"reactSnap": {
"puppeteerArgs": [
"--no-sandbox",
Expand All @@ -98,9 +96,21 @@
]
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.33.1",
"@typescript-eslint/parser": "^5.33.1",
"autoprefixer": "^10.4.7",
"cypress": "^10.6.0",
"eslint": "^8.22.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"lint-staged": "^13.0.3",
"postcss": "^8.4.13",
"prettier": "^2.7.1",
"puppeteer": "^13.7.0",
"react-snap": "^1.23.0",
"tailwindcss": "^3.0.24",
Expand Down