Commit e2965161 authored by Sophia's avatar Sophia

initial commit

parents
{
"parser": "@typescript-eslint/parser",
"extends": ["plugin:prettier/recommended", "prettier"],
"plugins": ["@typescript-eslint/eslint-plugin", "prettier", "import"],
"parserOptions": {
"sourceType": "module"
},
"globals": {
"__DEV__": true,
"__WEB__": true
},
"env": {
"browser": true,
"jest": true
},
"rules": {
"no-dupe-class-members": "off",
"no-undef": "off",
"no-plusplus": "off",
"class-methods-use-this": "off",
"lines-between-class-members": "off",
"no-use-before-define": "off",
"no-restricted-imports": [
"error",
{
"patterns": ["@mui/*/*/*", "!@mui/material/test-utils/*"]
}
],
// Forbid the use of extraneous packages
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md
"import/no-extraneous-dependencies": "off", // ["error", { packageDir: "." }],
// Recommend not to leave any console.log in your code
// Use console.error, console.warn and console.info instead
// https://eslint.org/docs/rules/no-console
"no-console": [
"error",
{
"allow": ["warn", "error", "info"]
}
],
// Allow only special identifiers
// https://eslint.org/docs/rules/no-underscore-dangle
"no-underscore-dangle": [
"error",
{
"allow": ["__typename", "__DEV__", "__SERV__", "__default__", "__is_empty_row__"]
}
],
// Prefer destructuring from arrays and objects
// http://eslint.org/docs/rules/prefer-destructuring
"prefer-destructuring": [
"error",
{
"VariableDeclarator": {
"array": false,
"object": true
},
"AssignmentExpression": {
"array": false,
"object": false
}
},
{
"enforceForRenamedProperties": false
}
],
// Ensure <a> tags are valid
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md
"jsx-a11y/anchor-is-valid": [
"error",
{
"components": ["Link"],
"specialLink": ["href"],
"aspects": ["invalidHref", "preferButton"]
}
],
// Allow .js files to use JSX syntax
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md
"react/jsx-filename-extension": [1, { "extensions": [".ts", ".tsx"] }],
// Functional and class components are equivalent from React’s point of view
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-stateless-function.md
"react/prefer-stateless-function": "off",
// ESLint plugin for prettier formatting
// https://github.com/prettier/eslint-plugin-prettier
"prettier/prettier": "error",
"react/forbid-prop-types": "off",
"react/destructuring-assignment": "off",
"react/jsx-props-no-spreading": "off",
"react/static-property-placement": "off",
"react/state-in-constructor": "off",
"react/react-in-jsx-scope": "off",
"react/require-default-props": "off",
// TypeScript checks prop-types
"react/prop-types": "off",
// Cannot config .ts, .tsx resolution
"import/no-unresolved": "off",
"import/no-webpack-loader-syntax": "off",
"import/extensions": "off",
"import/prefer-default-export": "off",
"import/order": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"vars": "local",
"args": "after-used",
"ignoreRestSiblings": false,
"argsIgnorePattern": "^(_|type|of|returns)"
}
],
// Type variables by Codegen can not be camelcase.
"camelcase": "off",
"css-modules/no-undef-class": [2, { "camelCase": true }],
"css-modules/no-unused-class": [2, { "camelCase": true }]
},
"settings": {
"polyfills": [
"Promise",
"fetch",
"Date.now",
"Set",
"Array.from",
"document.querySelector",
"document.head",
"Object.create",
"Object.keys",
"window.pageYOffset",
"window.pageXOffset",
"Object.entries",
"Array.isArray",
"Object.values"
]
}
}
/.idea
/node_modules
{
"singleQuote": false,
"trailingComma": "all",
"arrowParens": "avoid",
"printWidth": 160,
"tabWidth": 4,
"endOfLine": "lf"
}
{
"name": "srvpro-types",
"version": "0.0.1",
"description": "type definition for srvpro https://github.com/mycard/srvpro",
"main": "index.js",
"repository": "git@git.mycard.moe:async3619/srvpro-types.git",
"author": "Sophia <beyondthesophia@gmail.com>",
"license": "MIT",
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"eslint": "^8.0.1",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-prettier": "^4.0.0",
"prettier": "^2.4.1",
"typescript": "^4.4.4"
}
}
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment