Skip to content

Commit

Permalink
Use the package.json exports field to handle different VexFlow bundles.
Browse files Browse the repository at this point in the history
  • Loading branch information
ronyeh committed Nov 3, 2021
1 parent 6823ab6 commit bf45050
Show file tree
Hide file tree
Showing 97 changed files with 784 additions and 504 deletions.
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
fonts
tests/support/*
node_modules/*
35 changes: 29 additions & 6 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@
"parserOptions": {
"project": "tsconfig.json"
},
"plugins": ["@typescript-eslint", "prettier", "simple-import-sort"],
"plugins": ["@typescript-eslint", "prettier", "simple-import-sort", "import"],
"rules": {
"no-console": 1, // Means warning
"prettier/prettier": 2, // Means error
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error"
"no-console": "warn",
"prettier/prettier": "warn",
"simple-import-sort/imports": "warn",
"simple-import-sort/exports": "warn",
"import/first": "error",
"import/no-duplicates": "error",
"import/newline-after-import": "warn"
},
"overrides": [
{
Expand All @@ -22,7 +25,27 @@
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/no-inferrable-types": "off"
"@typescript-eslint/no-inferrable-types": "off",
"simple-import-sort/imports": [
"warn",
{
"groups": [
// Vex goes first!
["^.*/vex$"],
["^.*/vexflow_test_helpers$"],
// Side effect imports.
["^\\u0000"],
// Packages.
// Things that start with a letter (or digit or underscore), or `@` followed by a letter.
["^@?\\w"],
// Absolute imports and other imports such as Vue-style `@/foo`.
// Anything not matched in another group.
["^"],
// All other relative imports (anything that starts with a dot).
["^\\."]
]
}
]
}
},
{
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@
"eslint.format.enable": true,
"javascript.format.enable": false,
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "esbenp.prettier-vscode",
"typescript.tsdk": "node_modules/typescript/lib"
}
Loading

0 comments on commit bf45050

Please sign in to comment.