-
Notifications
You must be signed in to change notification settings - Fork 4
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 #541 from MetaCell/feature/GEP-156
GEP-156 GEP-157 GEP-128 GEP-14 Update dep versions, simplify the use of yalc, and update layout-manager-playground to vite
- Loading branch information
Showing
128 changed files
with
12,565 additions
and
35,543 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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import js from '@eslint/js' | ||
import globals from 'globals' | ||
import reactHooks from 'eslint-plugin-react-hooks' | ||
import reactRefresh from 'eslint-plugin-react-refresh' | ||
import tseslint from 'typescript-eslint' | ||
import json from 'eslint-plugin-json' | ||
|
||
|
||
export default tseslint.config( | ||
{ ignores: [ | ||
'dist', | ||
'node_modules', | ||
'.yalc', | ||
'src/rest/*' // do not lint generated code | ||
] }, | ||
{ | ||
extends: [js.configs.recommended, ...tseslint.configs.recommended], | ||
files: ['**/*.{ts,tsx,js,jsx}'], | ||
languageOptions: { | ||
ecmaVersion: "latest", | ||
globals: globals.browser, | ||
sourceType: "module" | ||
}, | ||
plugins: { | ||
'react-hooks': reactHooks, | ||
'react-refresh': reactRefresh, | ||
}, | ||
rules: { | ||
...reactHooks.configs.recommended.rules, | ||
'react-refresh/only-export-components': [ | ||
'warn', | ||
{ allowConstantExport: true }, | ||
], | ||
indent: ["error", 2, { | ||
SwitchCase: 1, | ||
}], | ||
curly: "error", // enforce braces for one-line blocks | ||
"no-tabs": "error", // enforce no tabs | ||
"no-console": ["warn", { | ||
allow: ["warn", "error", "debug"], | ||
}], | ||
"consistent-return": "warn", // https://eslint.org/docs/latest/rules/consistent-return | ||
"prefer-arrow-callback": ["warn"], | ||
"object-curly-spacing": ["warn", "always"], // enforce consistent spacing inside braces | ||
"func-style": "off", // function expressions or arrow functions are equally valid | ||
"no-unneeded-ternary": "warn", // disallow unnecessary ternary expressions | ||
// React rules: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules | ||
"react/prop-types": "off", // PropTypes are not forced | ||
"react/forbid-prop-types": "off", // all PropTypes are allowed | ||
"react-hooks/rules-of-hooks": "error", // https://react.dev/reference/rules/rules-of-hooks | ||
"react-hooks/exhaustive-deps": "warn", // Hooks dependency array, sometimes it's better to ignore | ||
}, | ||
}, | ||
{ // Linting for tsconfig.json files allows comments | ||
files: ["tsconfig*.json"], | ||
plugins: { json }, | ||
processor: "json/json", | ||
rules: { | ||
...json.configs["recommended-with-comments"].rules, | ||
} | ||
}, | ||
{ // Linting for *.json files do now allow comments | ||
files: ["**/*.json"], | ||
ignores: ["tsconfig*.json"], | ||
plugins: { json }, | ||
processor: "json/json", | ||
rules: { | ||
...json.configs.recommended.rules, | ||
} | ||
} | ||
) |
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,15 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<link rel="manifest" href="/manifest.json" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<meta name="theme-color" content="#000000" /> | ||
<title>Geppetto Layout Manager Playground</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/index.tsx"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.