Skip to content

Commit

Permalink
feat: update lint config
Browse files Browse the repository at this point in the history
  • Loading branch information
abelflopes committed Feb 21, 2024
1 parent 4ced1ea commit c1b2bf0
Show file tree
Hide file tree
Showing 13 changed files with 580 additions and 100 deletions.
2 changes: 1 addition & 1 deletion .eslintcache
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/specs/index.snapshot.test.ts":"1","/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/specs/index.unit.test.ts":"2","/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/src/index.ts":"3","/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/src/config-base.ts":"4","/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/src/config-react.ts":"5","/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/src/config-testing.ts":"6","/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/src/config-typescript.ts":"7","/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/jest.config.ts":"8"},{"size":170,"mtime":1707097005292,"results":"9","hashOfConfig":"10"},{"size":1049,"mtime":1707097482072,"results":"11","hashOfConfig":"10"},{"size":2102,"mtime":1707096715802,"results":"12","hashOfConfig":"10"},{"size":6165,"mtime":1707096822908,"results":"13","hashOfConfig":"10"},{"size":2978,"mtime":1707095421992,"results":"14","hashOfConfig":"10"},{"size":1362,"mtime":1707095346500,"results":"15","hashOfConfig":"10"},{"size":4412,"mtime":1707097531015,"results":"16","hashOfConfig":"10"},{"size":116,"mtime":1707097206664,"results":"17","hashOfConfig":"10"},{"filePath":"18","messages":"19","suppressedMessages":"20","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"u7ble2",{"filePath":"21","messages":"22","suppressedMessages":"23","errorCount":2,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"24","messages":"25","suppressedMessages":"26","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"27","messages":"28","suppressedMessages":"29","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"30","messages":"31","suppressedMessages":"32","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"33","messages":"34","suppressedMessages":"35","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"36","messages":"37","suppressedMessages":"38","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"39","messages":"40","suppressedMessages":"41","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/specs/index.snapshot.test.ts",[],[],"/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/specs/index.unit.test.ts",["42","43"],["44"],"/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/src/index.ts",[],[],"/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/src/config-base.ts",[],[],"/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/src/config-react.ts",[],[],"/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/src/config-testing.ts",[],[],"/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/src/config-typescript.ts",[],[],"/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/jest.config.ts",[],[],{"ruleId":"45","severity":2,"message":"46","line":26,"column":7,"nodeType":"47","messageId":"48","endLine":26,"endColumn":18,"suggestions":"49"},{"ruleId":"45","severity":2,"message":"46","line":27,"column":7,"nodeType":"47","messageId":"48","endLine":27,"endColumn":18,"suggestions":"50"},{"ruleId":"51","severity":2,"message":"52","line":8,"column":7,"nodeType":"53","messageId":"54","endLine":11,"endColumn":10,"suppressions":"55"},"no-console","Unexpected console statement.","MemberExpression","unexpected",["56"],["57"],"no-new","Do not use 'new' for side effects.","ExpressionStatement","noNewStatement",["58"],{"messageId":"59","data":"60","fix":"61","desc":"62"},{"messageId":"59","data":"63","fix":"64","desc":"62"},{"kind":"65","justification":"66"},"removeConsole",{"propertyName":"67"},{"range":"68","text":"69"},"Remove the console.log().",{"propertyName":"67"},{"range":"70","text":"69"},"directive","in this case its necessary for testing","log",[622,639],"",[646,697]]
[{"/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/specs/index.snapshot.test.ts":"1","/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/specs/index.unit.test.ts":"2","/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/src/index.ts":"3","/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/src/config-base.ts":"4","/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/src/config-react.ts":"5","/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/src/config-testing.ts":"6","/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/src/config-typescript.ts":"7","/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/jest.config.ts":"8"},{"size":170,"mtime":1707097005292,"results":"9","hashOfConfig":"10"},{"size":1436,"mtime":1708474853884,"results":"11","hashOfConfig":"10"},{"size":2119,"mtime":1708474914122,"results":"12","hashOfConfig":"10"},{"size":6249,"mtime":1708474927115,"results":"13","hashOfConfig":"10"},{"size":2635,"mtime":1707315687431,"results":"14","hashOfConfig":"10"},{"size":1318,"mtime":1707140324255,"results":"15","hashOfConfig":"10"},{"size":4425,"mtime":1707352264520,"results":"16","hashOfConfig":"10"},{"size":116,"mtime":1708474859080,"results":"17","hashOfConfig":"10"},{"filePath":"18","messages":"19","suppressedMessages":"20","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1vwysot",{"filePath":"21","messages":"22","suppressedMessages":"23","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"24","messages":"25","suppressedMessages":"26","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"27","messages":"28","suppressedMessages":"29","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"30","messages":"31","suppressedMessages":"32","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"33","messages":"34","suppressedMessages":"35","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"36","messages":"37","suppressedMessages":"38","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"39","messages":"40","suppressedMessages":"41","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/specs/index.snapshot.test.ts",[],[],"/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/specs/index.unit.test.ts",[],["42","43"],"/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/src/index.ts",[],[],"/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/src/config-base.ts",[],["44"],"/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/src/config-react.ts",[],[],"/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/src/config-testing.ts",[],[],"/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/src/config-typescript.ts",[],[],"/Users/alopes/Desktop/dev-abel/eslint-config-tsr-pro/jest.config.ts",[],[],{"ruleId":"45","severity":2,"message":"46","line":9,"column":7,"nodeType":"47","messageId":"48","endLine":12,"endColumn":10,"suppressions":"49"},{"ruleId":"50","severity":2,"message":"51","line":42,"column":5,"nodeType":"52","messageId":"53","endLine":42,"endColumn":18,"suggestions":"54","suppressions":"55"},{"ruleId":"56","severity":1,"message":"57","line":158,"column":5,"nodeType":null,"messageId":"58","endLine":164,"endColumn":10,"suppressions":"59"},"no-new","Do not use 'new' for side effects.","ExpressionStatement","noNewStatement",["60"],"no-console","Unexpected console statement.","MemberExpression","unexpected",["61"],["62"],"etc/no-commented-out-code","Commented-out code is forbidden.","forbidden",["63"],{"kind":"64","justification":"65"},{"messageId":"66","data":"67","fix":"68","desc":"69"},{"kind":"64","justification":"70"},{"kind":"64","justification":"71"},"directive","in this case its necessary for testing","removeConsole",{"propertyName":"72"},{"range":"73","text":"74"},"Remove the console.error().","send information of deprecated rules to the console","TODO: to confirm ETC plugin rules","error",[1115,1365],""]
3 changes: 0 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

const config = {
extends: "./dist/index.js",
rules: {
"unicorn/prefer-module": 0,
},
};

module.exports = config;
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ Used plugins / configs:
- [x] [Eslint Comments](https://www.npmjs.com/package/eslint-plugin-eslint-comments)
- [ ] [Stylistic (TODO)](https://www.npmjs.com/package/@stylistic/eslint-plugin)
- [ ] [N (TODO)](https://www.npmjs.com/package/eslint-plugin-n)
- [ ] [Compat (TODO)](https://github.com/amilajack/eslint-plugin-compat)
- [ ] [Promise](https://github.com/eslint-community/eslint-plugin-promise)

To achieve maximum consistency, use along with [prettier-config-pro](https://www.npmjs.com/package/@abelflopes/prettier-config-pro);

Expand Down
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Config } from "jest";
import { type Config } from "jest";

const config: Config = {
testEnvironment: "node",
Expand Down
Loading

0 comments on commit c1b2bf0

Please sign in to comment.