Skip to content

Commit

Permalink
Merge pull request #394 from penge/eslint
Browse files Browse the repository at this point in the history
Use more strict linter
  • Loading branch information
penge authored Jul 27, 2022
2 parents 417d9dd + 68af85d commit 944926b
Show file tree
Hide file tree
Showing 138 changed files with 3,041 additions and 1,564 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
out/*
jest.config.js
build.js
set-client-id.js
37 changes: 29 additions & 8 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,20 +1,41 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
"airbnb",
"airbnb-typescript"
],
"parserOptions": {
"project": "./tsconfig.json"
},
"env": {
"node": true
},
"settings": {
"react": {
"version": "18"
}
},
"rules": {
"indent": ["error", 2],
"quotes": ["error", "double"],
"quotes": ["error", "double", { "avoidEscape": true }],
"semi": ["error", "always"],
"no-multi-spaces": ["error", { "ignoreEOLComments": true }]
"no-multi-spaces": ["error", { "ignoreEOLComments": true }],
"max-len": ["error", { "code": 150 }],
"no-alert": "off",
"no-console": "off",
"implicit-arrow-linebreak": ["off"],
"react/react-in-jsx-scope": ["off"],
"react/require-default-props": ["off"],
"react/function-component-definition": [
"error",
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
"jsx-a11y/no-autofocus": ["off"],
"jsx-a11y/click-events-have-key-events": ["off"],
"jsx-a11y/no-static-element-interactions": ["off"],
"@typescript-eslint/quotes": ["error", "double", { "avoidEscape": true }]
}
}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.DS_Store
.vscode
node_modules/
out/

2 changes: 1 addition & 1 deletion env/set-client-id.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if (!clientId) {
return;
}

const fs = require("fs"); // eslint-disable-line
const fs = require("fs");
const manifestContent = JSON.parse(fs.readFileSync(manifestPath, "utf8"));
manifestContent.oauth2.client_id = clientId;
fs.writeFileSync(manifestPath, JSON.stringify(manifestContent, null, 2));
Loading

0 comments on commit 944926b

Please sign in to comment.