Skip to content

Commit d757f45

Browse files
committed
update
Signed-off-by: Clemens Vasters <clemens@vasters.com>
1 parent 8d8b1be commit d757f45

File tree

4 files changed

+31
-32
lines changed

4 files changed

+31
-32
lines changed

avrotize/avrotopython/enum_core.jinja

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ class {{ class_name }}(Enum):
3131

3232
if ordinal is None:
3333
raise ValueError("ordinal must not be None")
34-
{%- if ordinals | length > 0 %}
3534
if isinstance(ordinal, str) and ordinal.isdigit():
3635
ordinal = int(ordinal)
36+
{%- if ordinals | length > 0 %}
3737
if isinstance(ordinal, int):
3838
{%- for sym, ord in ordinals.items() -%}
3939
{%- if loop.first %}

vscode/avrotize/.eslintrc.json

-30
This file was deleted.

vscode/avrotize/eslint.config.mjs

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import typescriptEslint from "@typescript-eslint/eslint-plugin";
2+
import tsParser from "@typescript-eslint/parser";
3+
4+
export default [{
5+
ignores: ["**/out", "**/dist", "**/*.d.ts"],
6+
}, {
7+
plugins: {
8+
"@typescript-eslint": typescriptEslint,
9+
},
10+
11+
languageOptions: {
12+
parser: tsParser,
13+
ecmaVersion: 6,
14+
sourceType: "module",
15+
},
16+
17+
rules: {
18+
"@typescript-eslint/naming-convention": ["warn", {
19+
selector: "import",
20+
format: ["camelCase", "PascalCase"],
21+
}],
22+
23+
"@typescript-eslint/semi": "warn",
24+
curly: "warn",
25+
eqeqeq: "warn",
26+
"no-throw-literal": "warn",
27+
semi: "off",
28+
},
29+
}];

vscode/avrotize/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@
492492
"watch-tests": "tsc -p . -w --outDir out",
493493
"pretest": "npm run compile-tests && npm run compile && npm run lint",
494494
"check-types": "tsc --noEmit",
495-
"lint": "eslint src",
495+
"lint": "eslint",
496496
"test": "vscode-test",
497497
"deploy": "vsce publish --no-yarn"
498498
},

0 commit comments

Comments
 (0)