Skip to content

Commit

Permalink
feat: add lint tools
Browse files Browse the repository at this point in the history
feat(ts/renderer): change filename index.js to index.ts
chore: lint
chore(ts): add types

Signed-off-by: kash / Hytus <[email protected]>
  • Loading branch information
KashEight committed Oct 25, 2023
1 parent 01f8248 commit f851f26
Show file tree
Hide file tree
Showing 21 changed files with 3,086 additions and 825 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
50 changes: 50 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"root": true,
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:import/recommended",
"plugin:import/electron",
"plugin:import/typescript",
"prettier"
],
"plugins": ["import", "unused-imports"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/ban-types": [
"error",
{
"extendDefaults": true,
"types": {
"{}": false
}
}
],
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-misused-promises": [
"error",
{
"checksVoidReturn": {
"arguments": false,
"attributes": false
}
}
],
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/consistent-indexed-object-style": "error",
// v6 rules
"@typescript-eslint/no-duplicate-type-constituents": "off",
"@typescript-eslint/no-redundant-type-constituents": "off",
// for eslint-plugin-unused-imports
"@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "error"
},
"ignorePatterns": ["webpack.*", "forge.config.ts"]
}
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": false,
"singleQuote": false,
"endOfLine": "lf"
}
Loading

0 comments on commit f851f26

Please sign in to comment.