-
-
Notifications
You must be signed in to change notification settings - Fork 439
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into sort-by-cfp-date
- Loading branch information
Showing
35 changed files
with
4,234 additions
and
413 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 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,58 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true, | ||
"node": true | ||
}, | ||
"extends": ["eslint:recommended", "plugin:react/recommended", "plugin:react-hooks/recommended", "plugin:jsx-a11y/recommended"], | ||
"parserOptions": { | ||
"ecmaVersion": 12, | ||
"sourceType": "module", | ||
"ecmaFeatures": { | ||
"jsx": true | ||
} | ||
}, | ||
"plugins": ["react", "react-hooks", "jsx-a11y"], | ||
"rules": { | ||
//add customize rules here as per your project's needs | ||
"jsx-quotes" : 1, | ||
"react/display-name": 0, | ||
"react/forbid-prop-types": 0, | ||
"react/jsx-boolean-value": 1, | ||
"react/jsx-closing-bracket-location": 1, | ||
"react/jsx-curly-spacing": 1, | ||
"react/jsx-handler-names": 1, | ||
"react/jsx-indent-props": 1, | ||
"react/jsx-indent": 1, | ||
"react/jsx-key": 1, | ||
"react/jsx-max-props-per-line": 0, | ||
"react/jsx-no-bind": 0, | ||
"react/jsx-no-duplicate-props": 1, | ||
"react/jsx-no-literals": 0, | ||
"react/jsx-no-undef": 1, | ||
"react/jsx-pascal-case": 1, | ||
"react/jsx-sort-prop-types": 0, | ||
"react/jsx-sort-props": 0, | ||
"react/no-danger": 1, | ||
"react/no-deprecated": 1, | ||
"react/no-did-mount-set-state": 1, | ||
"react/no-did-update-set-state": 1, | ||
"react/no-direct-mutation-state": 1, | ||
"react/no-is-mounted": 1, | ||
"react/no-multi-comp": 0, | ||
"react/no-set-state": 1, | ||
"react/no-string-refs": 0, | ||
"react/no-unknown-property": 1, | ||
"react/prefer-es6-class": 1, | ||
"react/prop-types": 1, | ||
"react/react-in-jsx-scope": 1, | ||
"react/require-extension": 1, | ||
"react/self-closing-comp": 1, | ||
"react/sort-comp": 1, | ||
"react/wrap-multilines": 1, | ||
"jsx-a11y/rule-name": 2 | ||
}, | ||
"globals": { | ||
"__dirname": true | ||
} | ||
} |
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,20 @@ | ||
{ | ||
"arrowParens": "always", | ||
"bracketSpacing": true, | ||
"embeddedLanguageFormatting": "auto", | ||
"htmlWhitespaceSensitivity": "css", | ||
"insertPragma": false, | ||
"jsxBracketSameLine": false, | ||
"jsxSingleQuote": true, | ||
"proseWrap": "preserve", | ||
"quoteProps": "as-needed", | ||
"requirePragma": false, | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"useTabs": false, | ||
"vueIndentScriptAndStyle": false, | ||
"printWidth": 140, | ||
"tabWidth": 2, | ||
"rangeStart": 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
import globals from "globals"; | ||
import pluginJs from "@eslint/js"; | ||
import pluginReact from "eslint-plugin-react"; | ||
|
||
/** @type {import('eslint').Linter.Config[]} */ | ||
export default [ | ||
{files: ["**/*.{js,mjs,cjs,jsx}"]}, | ||
{languageOptions: { globals: globals.node}}, | ||
pluginJs.configs.recommended, | ||
pluginReact.configs.flat.recommended, | ||
{ | ||
"settings": { | ||
"react": { | ||
"createClass": "createReactClass", // Regex for Component Factory to use, | ||
// default to "createReactClass" | ||
"pragma": "React", // Pragma to use, default to "React" | ||
"fragment": "Fragment", // Fragment to use (may be a property of <pragma>), default to "Fragment" | ||
"version": "detect", // React version. "detect" automatically picks the version you have installed. | ||
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value. | ||
// Defaults to the "defaultVersion" setting and warns if missing, and to "detect" in the future | ||
"defaultVersion": "", // Default React version to use when the version you have installed cannot be detected. | ||
// If not provided, defaults to the latest React version. | ||
"flowVersion": "0.53" // Flow version | ||
}, | ||
"propWrapperFunctions": [ | ||
// The names of any function used to wrap propTypes, e.g. `forbidExtraProps`. If this isn't set, any propTypes wrapped in a function will be skipped. | ||
"forbidExtraProps", | ||
{"property": "freeze", "object": "Object"}, | ||
{"property": "myFavoriteWrapper"}, | ||
// for rules that check exact prop wrappers | ||
{"property": "forbidExtraProps", "exact": true} | ||
], | ||
"componentWrapperFunctions": [ | ||
// The name of any function used to wrap components, e.g. Mobx `observer` function. If this isn't set, components wrapped by these functions will be skipped. | ||
"observer", // `property` | ||
{"property": "styled"}, // `object` is optional | ||
{"property": "observer", "object": "Mobx"}, | ||
{"property": "observer", "object": "<pragma>"} // sets `object` to whatever value `settings.react.pragma` is set to | ||
], | ||
"formComponents": [ | ||
// Components used as alternatives to <form> for forms, eg. <Form endpoint={ url } /> | ||
"CustomForm", | ||
{"name": "SimpleForm", "formAttribute": "endpoint"}, | ||
{"name": "Form", "formAttribute": ["registerEndpoint", "loginEndpoint"]}, // allows specifying multiple properties if necessary | ||
], | ||
"linkComponents": [ | ||
// Components used as alternatives to <a> for linking, eg. <Link to={ url } /> | ||
"Hyperlink", | ||
{"name": "MyLink", "linkAttribute": "to"}, | ||
{"name": "Link", "linkAttribute": ["to", "href"]}, // allows specifying multiple properties if necessary | ||
], | ||
"jsx-a11y": { | ||
"polymorphicPropName": "as", | ||
"attributes": { | ||
"for": ["htmlFor", "for"] | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
rules: { | ||
"react/prefer-stateless-function": "error", | ||
"react/button-has-type": "error", | ||
"react/no-unused-prop-types": "error", | ||
"react/jsx-pascal-case": "error", | ||
"react/jsx-no-script-url": "error", | ||
"react/no-children-prop": "error", | ||
"react/no-danger": "error", | ||
"react/no-danger-with-children": "error", | ||
"react/no-unstable-nested-components": ["error", { allowAsProps: true }], | ||
"react/jsx-fragments": "error", | ||
"react/destructuring-assignment": [ | ||
"error", | ||
"always", | ||
{ destructureInSignature: "always" }, | ||
], | ||
"react/jsx-no-leaked-render": ["error", { validStrategies: ["ternary"] }], | ||
"react/jsx-max-depth": ["error", { max: 5 }], | ||
"react/function-component-definition": [ | ||
"warn", | ||
{ namedComponents: "arrow-function" }, | ||
], | ||
"react/jsx-key": [ | ||
"error", | ||
{ | ||
checkFragmentShorthand: true, | ||
checkKeyMustBeforeSpread: true, | ||
warnOnDuplicates: true, | ||
}, | ||
], | ||
"react/jsx-no-useless-fragment": "warn", | ||
"react/jsx-curly-brace-presence": "warn", | ||
"react/no-typos": "warn", | ||
"react/display-name": "warn", | ||
"react/self-closing-comp": "warn", | ||
"react/jsx-sort-props": "warn", | ||
"react/react-in-jsx-scope": "off", | ||
"react/jsx-one-expression-per-line": "off", | ||
"react/prop-types": "off", | ||
} | ||
} | ||
]; |
Oops, something went wrong.