Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a 'recompile' button #141

Merged
merged 26 commits into from
Dec 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c9d3162
Add a 'recompile' button
BarryNolte Mar 31, 2024
750e455
Too much c# programming makes my typescipt programming... different.
BarryNolte Mar 31, 2024
7da4ca1
Sure, don't give me all the errors at once.
BarryNolte Mar 31, 2024
61fa625
FWIW, I like my indenting just fine.
BarryNolte Mar 31, 2024
3b0ddc1
Add a 'recompile' button
BarryNolte Apr 23, 2024
f0db83d
Merge branch 'terrastruct:master' into BarryNolte/issue133
BarryNolte Apr 23, 2024
4955ebd
Merge branch 'BarryNolte/issue133' of https://github.com/BarryNolte/d…
BarryNolte Apr 23, 2024
4f8b2c1
Add a 'recompile' button
BarryNolte Apr 23, 2024
aa0c072
Add a 'recompile' button
BarryNolte May 7, 2024
051de66
upgraded eslint is picky about 'any'
BarryNolte May 7, 2024
da8e086
lint found more things for me to fix
BarryNolte May 7, 2024
22f66e3
Add a 'recompile' button
BarryNolte May 15, 2024
82b93df
Add a 'recompile' button
BarryNolte May 17, 2024
6ddfd84
Update yarn.lock
BarryNolte May 17, 2024
e7a1b10
Add a 'recompile' button
BarryNolte Dec 14, 2024
f206db2
Update eslint
BarryNolte Dec 14, 2024
29c4b1f
converted eslint config file to new format
BarryNolte Dec 14, 2024
9bafd52
Knocking down build errors after being idle for almost a year
BarryNolte Dec 14, 2024
32e949e
One more package needed
BarryNolte Dec 14, 2024
5cd74dd
Nope, one more...
BarryNolte Dec 14, 2024
f61264c
More fixups
BarryNolte Dec 14, 2024
a6edc4b
blah...
BarryNolte Dec 14, 2024
128c475
One more try
BarryNolte Dec 14, 2024
abc2b8b
Help if I update the file I intended too.
BarryNolte Dec 14, 2024
876dab0
Meh...
BarryNolte Dec 14, 2024
c43386e
yarn.lock? Really?
BarryNolte Dec 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
}
],
"line-comment-position": "error",
"linebreak-style": ["error", "unix"],
"lines-around-comment": "off",
"lines-around-directive": "error",
"lines-between-class-members": [
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ dist
npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json
5 changes: 5 additions & 0 deletions .hintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": [
"development"
]
}
5 changes: 4 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
{}
{
"endOfLine": "auto",
"printWidth": 90
}
268 changes: 268 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,268 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [
...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"),
{
plugins: {
"@typescript-eslint": typescriptEslint,
},

languageOptions: {
globals: {
...Object.fromEntries(Object.entries(globals.browser).map(([key]) => [key, "off"])),
},


parser: tsParser,
ecmaVersion: 12,
sourceType: "module",

parserOptions: {
project: ["src/tsconfig.json"],
},
},

rules: {
"@typescript-eslint/ban-ts-comment": "off",
"accessor-pairs": "error",
"array-bracket-newline": "off",
"array-bracket-spacing": ["error", "never"],
"array-callback-return": "error",
"array-element-newline": "off",
"arrow-body-style": "off",
"arrow-parens": "off",

"arrow-spacing": ["error", {
after: true,
before: true,
}],

"block-scoped-var": "error",
"block-spacing": "error",
"brace-style": ["error", "1tbs"],
"callback-return": "error",
camelcase: "off",
"capitalized-comments": "off",
"class-methods-use-this": "off",
"comma-dangle": 0,
"comma-spacing": "off",
"comma-style": ["error", "last"],
complexity: "off",
"computed-property-spacing": ["error", "never"],
"consistent-return": "error",
"consistent-this": "error",
curly: "error",
"default-case": "off",
"dot-location": ["error", "property"],

"dot-notation": ["off", {
allowKeywords: true,
}],

"eol-last": "error",
eqeqeq: "error",
"for-direction": "error",
"func-call-spacing": "error",
"func-name-matching": "error",
"func-names": "error",
"func-style": "off",
"function-paren-newline": "off",
"generator-star-spacing": "off",
"getter-return": "error",
"global-require": "off",
"guard-for-in": "error",
"handle-callback-err": "error",
"id-blacklist": "error",
"id-length": "off",
"id-match": "error",
"indent-legacy": "off",
"init-declarations": "off",
"jsx-quotes": "error",
"key-spacing": "error",

"keyword-spacing": ["error", {
after: true,
before: true,
}],

"line-comment-position": "error",
"lines-around-comment": "off",
"lines-around-directive": "error",

"lines-between-class-members": ["error", "always", {
exceptAfterSingleLine: true,
}],

"max-depth": "off",
"max-len": "off",
"max-lines": "off",
"max-nested-callbacks": "error",
"max-params": "off",
"max-statements": "off",
"max-statements-per-line": "error",
"multiline-comment-style": "off",
"new-parens": "error",
"newline-after-var": "off",
"newline-before-return": "off",
"newline-per-chained-call": "off",
"no-alert": "off",
"no-array-constructor": "error",
"no-await-in-loop": "error",
"no-bitwise": "error",
"no-buffer-constructor": "error",
"no-caller": "error",
"no-catch-shadow": "error",
"no-confusing-arrow": "error",
"no-console": "off",
"no-continue": "off",
"no-div-regex": "error",
"no-duplicate-imports": "error",
"no-else-return": "off",
"no-empty-function": "off",
"no-eq-null": "error",
"no-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-label": "error",
"no-extra-parens": "off",
"no-floating-decimal": "error",
"no-implicit-coercion": "error",
"no-implicit-globals": "error",
"no-implied-eval": "error",
"no-inline-comments": "error",
"no-invalid-this": "off",
"no-debugger": "off",
"no-iterator": "error",
"no-label-var": "error",
"no-labels": "error",
"no-lone-blocks": "error",
"no-lonely-if": "off",
"no-loop-func": "error",
"no-magic-numbers": "off",
"no-mixed-operators": "off",
"no-mixed-requires": "error",
"no-multi-assign": "error",
"no-multi-spaces": "error",
"no-multi-str": "error",
"no-multiple-empty-lines": "error",
"no-native-reassign": "error",
"no-negated-condition": "off",
"no-negated-in-lhs": "error",
"no-nested-ternary": "error",
"no-new": "error",
"no-new-func": "error",
"no-new-object": "error",
"no-new-require": "error",
"no-new-wrappers": "error",
"no-octal-escape": "error",
"no-param-reassign": "off",
"no-path-concat": "error",
"no-plusplus": "off",
"no-process-env": "off",
"no-process-exit": "error",
"no-proto": "error",
"no-prototype-builtins": "off",
"no-restricted-globals": "error",
"no-restricted-imports": "error",
"no-restricted-modules": "error",
"no-restricted-properties": "error",
"no-restricted-syntax": "error",
"no-return-assign": "error",
"no-return-await": "error",
"no-script-url": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-shadow": "error",
"no-shadow-restricted-names": "error",
"no-spaced-func": "error",
"no-sync": "error",
"no-tabs": "off",
"no-template-curly-in-string": "error",
"no-ternary": "off",
"no-throw-literal": "error",
"no-trailing-spaces": "off",
"no-undef-init": "error",
"no-undefined": "off",
"no-underscore-dangle": "off",
"no-unmodified-loop-condition": "error",
"no-unneeded-ternary": "error",
"no-unused-expressions": "error",
"no-unused-vars": "error",
"no-use-before-define": "off",
"no-useless-call": "error",
"no-useless-computed-key": "error",
"no-useless-concat": "error",
"no-useless-constructor": "off",
"no-useless-rename": "error",
"no-useless-return": "error",
"no-var": "off",
"no-void": "error",
"no-warning-comments": "off",
"no-whitespace-before-property": "error",
"no-with": "error",
"nonblock-statement-body-position": "error",
"object-curly-newline": "off",
"object-curly-spacing": "off",
"object-property-newline": "off",
"object-shorthand": "off",
"one-var": "off",
"one-var-declaration-per-line": "error",
"operator-assignment": ["error", "always"],
"operator-linebreak": "error",
"padded-blocks": "off",
"padding-line-between-statements": "error",
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-destructuring": "off",
"prefer-numeric-literals": "error",
"prefer-promise-reject-errors": "error",
"prefer-reflect": "off",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "off",
"quote-props": "off",
quotes: "off",
radix: "error",
"require-await": "error",
"require-jsdoc": "off",
"rest-spread-spacing": "error",
semi: "off",
"semi-spacing": "off",
"semi-style": ["error", "last"],
"sort-imports": "off",
"sort-keys": "off",
"sort-vars": "off",
"space-before-blocks": "off",
"space-before-function-paren": "off",
"space-in-parens": ["error", "never"],
"space-infix-ops": "off",
"space-unary-ops": "error",
"spaced-comment": ["error", "always"],
strict: "error",
"switch-colon-spacing": "error",
"symbol-description": "error",
"template-curly-spacing": ["error", "never"],
"template-tag-spacing": "error",
"unicode-bom": ["error", "never"],
"valid-jsdoc": "off",
"vars-on-top": "error",
"wrap-iife": "error",
"yield-star-spacing": "error",
yoda: ["error", "never"],
},
},
];
2 changes: 1 addition & 1 deletion make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PATH="$(cd -- "$(dirname "$0")" && pwd)/ci/sub/bin:$PATH"
cd "$(dirname "$0")"

lint() {
sh_c hide xargsd "'\.\(ts\|tsx\|scss\|css\)$'" npx eslint@8.36.0
sh_c hide xargsd "'\.\(ts\|tsx\|scss\|css\)$'" npx eslint@9.17.0
}

ensure_changed_files
Expand Down
43 changes: 26 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -313,29 +313,38 @@
"pkg": "vsce package --out d2.vsix"
},
"devDependencies": {
"@eslint-community/eslint-utils": "^4.4.1",
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.17.0",
"@types/glob": "^8.0.0",
"@types/markdown-it-container": "^2.0.5",
"@types/markdown-it-container": "^2.0.10",
"@types/mocha": "^10.0.0",
"@types/node": "16.x",
"@types/node": "^20.17.6",
"@types/vscode": "^1.73.0",
"@typescript-eslint/eslint-plugin": "^5.50.0",
"@typescript-eslint/parser": "^5.50.0",
"@vscode/test-electron": "^2.2.0",
"@vscode/vsce": "^2.15.0",
"eslint": "^8.33.0",
"eslint-config-prettier": "^8.6.0",
"eslint-formatter-pretty": "^4.1.0",
"eslint-webpack-plugin": "^3.2.0",
"glob": "^8.0.3",
"mocha": "^10.1.0",
"prettier": "^2.8.3",
"@typescript-eslint/eslint-plugin": "^8.18.0",
"@typescript-eslint/parser": "^8.18.0",
"@vscode/test-electron": "^2.3.10",
"@vscode/vsce": "^2.26.1",
"eslint": "^9.17.0",
"eslint-config-prettier": "^9.1.0",
"eslint-formatter-pretty": "^6.0.1",
"eslint-plugin": "^1.0.1",
"eslint-utils": "^3.0.0",
"eslint-webpack-plugin": "^4.2.0",
"glob": "^10.3.15",
"globals": "^15.13.0",
"mocha": "^10.4.0",
"prettier": "^3.2.5",
"ts-loader": "^9.4.2",
"typescript": "^4.9.4",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0"
"typescript": "^5.6.3",
"typescript-eslint": "^8.18.0",
"webpack": "^5.96.1",
"webpack-cli": "^5.1.4"
},
"dependencies": {
"markdown-it-container": "^3.0.0"
"async-mutex": "^0.5.0",
"child_process": "^1.0.2",
"markdown-it-container": "^4.0.0"
},
"homepage": "https://d2lang.com",
"icon": "d2-icon.png",
Expand Down
Loading
Loading