Skip to content

Commit

Permalink
eslint-prettier integration
Browse files Browse the repository at this point in the history
  • Loading branch information
zsteinkamp committed Aug 17, 2024
1 parent bd0836c commit 5a859ec
Show file tree
Hide file tree
Showing 6 changed files with 1,154 additions and 12 deletions.
10 changes: 10 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
root: true,
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: __dirname
},
plugins: ["@typescript-eslint"]
};
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"semi": false,
"singleQuote": true,
"trailingComma": "es5"
}
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
"editor.formatOnType": false, // required
"editor.formatOnPaste": true, // optional
"editor.formatOnSave": true, // optional
"editor.formatOnSaveMode": "file", // required to format on save
"files.autoSave": "onFocusChange", // optional but recommended
"vs-code-prettier-eslint.prettierLast": false,
"[typescript]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
} // set as "true" to run 'prettier' last not first
}
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
"dev": "yarn install --frozen-lockfile && yarn tsc --watch"
},
"devDependencies": {
"@types/maxmsp": "^1.0.11",
"typescript": "^5.5.4"
},
"prettier": {
"printWidth": 100
"@tsconfig/recommended": "^1.0.7",
"@types/maxmsp": "^1.0.12",
"@typescript-eslint/eslint-plugin": "^5.1.0",
"@typescript-eslint/parser": "^5.0.1",
"eslint": "^8.52.0",
"prettier": "^3.1.0",
"prettier-eslint": "^16.1.2",
"typescript": "^4.4.4"
}
}
}
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const OUTLET_FOO = 0
setinletassist(INLET_FOO, 'Description of Inlet')
setoutletassist(OUTLET_FOO, 'Description of Outlet')

let debugLog = true
const debugLog = true

function debug(_: any) {
if (debugLog) {
Expand Down
Loading

0 comments on commit 5a859ec

Please sign in to comment.