Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion build/eslint-config-shared/js.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const jsConfigs = [
"block-scoped-var": "error",
"camelcase": "error",
// "capitalized-comments": "error",
"class-methods-use-this": "error", // Might need to warn instead to conform with interfaces
// "class-methods-use-this": "error", // Disabled by tseslint's class-methods-use-this
"complexity": "error",
"consistent-return": "error",
"consistent-this": "error",
Expand Down
40 changes: 20 additions & 20 deletions build/eslint-config-shared/perfectionist.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@ export const perfectionistConfigs = [
pluginPerfectionist.configs["recommended-natural"],
{
rules: {
// "sort-array-includes": "error",
// "sort-classes": "error",
// "sort-decorators": "error",
// "sort-enums": "error",
// "sort-exports": "error",
// "sort-heritage-clauses": "error",
// "sort-imports": "error",
// "sort-interfaces": "error",
// "sort-intersection-types": "error",
// "sort-jsx-props": "error",
// "sort-maps": "error",
// "sort-named-exports": "error",
// "sort-modules": "error",
// "sort-named-imports": "error",
// "sort-object-types": "error",
// "sort-objects": "error",
// "sort-sets": "error",
// "sort-switch-case": "error",
// "sort-union-types": "error",
// "sort-variable-declarations": "error",
// "perfectionist/sort-array-includes": "error",
"perfectionist/sort-classes": "off",
// "perfectionist/sort-decorators": "error",
// "perfectionist/sort-enums": "error",
// "perfectionist/sort-exports": "error",
// "perfectionist/sort-heritage-clauses": "error",
// "perfectionist/sort-imports": "error",
// "perfectionist/sort-interfaces": "error",
"perfectionist/sort-intersection-types": "off",
"perfectionist/sort-jsx-props": "off",
// "perfectionist/sort-maps": "error",
// "perfectionist/sort-named-exports": "error",
"perfectionist/sort-modules": "off",
// "perfectionist/sort-named-imports": "error",
"perfectionist/sort-object-types": "off",
"perfectionist/sort-objects": "off",
// "perfectionist/sort-sets": "error",
// "perfectionist/sort-switch-case": "error",
// "perfectionist/sort-union-types": "error",
// "perfectionist/sort-variable-declarations": "error",
},
},
];
25 changes: 19 additions & 6 deletions build/eslint-config-shared/stylistic.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const stylisticConfigs = [
// "@stylistic/eol-last": "error", // Enabled in recommended
"@stylistic/function-call-argument-newline": ["error", "consistent"],
"@stylistic/function-call-spacing": "error",
"@stylistic/function-paren-newline": "error",
"@stylistic/function-paren-newline": ["error", "multiline-arguments"],
// "@stylistic/generator-star-spacing": "error", // Enabled in recommended
// "@stylistic/implicit-arrow-linebreak": "error",
"@stylistic/indent": ["error", 4], // Enabled in recommended
Expand All @@ -30,12 +30,12 @@ export const stylisticConfigs = [
// "@stylistic/jsx-closing-tag-location": "error", // Enabled in recommended
// "@stylistic/jsx-curly-brace-presence": "error", // Enabled in recommended
// "@stylistic/jsx-curly-newline": "error", // Enabled in recommended
// "@stylistic/jsx-curly-spacing": "error", // Enabled in recommended
"@stylistic/jsx-curly-spacing": ["error", { "when": "always" }], // Enabled in recommended
// "@stylistic/jsx-equals-spacing": "error", // Enabled in recommended
// "@stylistic/jsx-first-prop-new-line": "error", // Enabled in recommended
// "@stylistic/jsx-function-call-newline": "error", // Enabled in recommended
// "@stylistic/jsx-indent": "error",
// "@stylistic/jsx-indent-props": "error", // Enabled in recommended
"@stylistic/jsx-indent-props": ["error", 4], // Enabled in recommended
// "@stylistic/jsx-max-props-per-line": "error", // Enabled in recommended
// "@stylistic/jsx-newline": "error",
"@stylistic/jsx-one-expression-per-line": "off", // Enabled in recommended
Expand All @@ -51,10 +51,23 @@ export const stylisticConfigs = [
// "@stylistic/line-comment-position": "error",
"@stylistic/linebreak-style": "error",
// "@stylistic/lines-around-comment": "error",
// "@stylistic/lines-between-class-members": "error", // Enabled in recommended
"@stylistic/lines-between-class-members": "off", // Enabled in recommended
// "@stylistic/max-len": "error",
// "@stylistic/max-statements-per-line": "error", // Enabled in recommended
// "@stylistic/member-delimiter-style": "error", // Enabled in recommended
"@stylistic/max-statements-per-line": "off", // Enabled in recommended
"@stylistic/member-delimiter-style": [
"error",
{
"multiline": {
"delimiter": "semi",
"requireLast": true
},
"singleline": {
"delimiter": "semi",
"requireLast": false
},
"multilineDetection": "brackets"
},
], // Enabled in recommended
// "@stylistic/multiline-comment-style": "error",
// "@stylistic/multiline-ternary": "error", // Enabled in recommended
// "@stylistic/new-parens": "error", // Enabled in recommended
Expand Down
4 changes: 2 additions & 2 deletions build/eslint-config-shared/tseslint.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ export const tseslintConfigs = [
// "@typescript-eslint/consistent-indexed-object-style": "error", // Enabled in stylistic
// "@typescript-eslint/consistent-return": "error",
// "@typescript-eslint/consistent-type-assertions": "error", // Enabled in stylistic
// "@typescript-eslint/consistent-type-definitions": "error", // Enabled in stylistic
"@typescript-eslint/consistent-type-definitions": ["error", "type"], // Enabled in stylistic
// "@typescript-eslint/consistent-type-exports": "error",
// "@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/default-param-last": "error",
// "@typescript-eslint/dot-notation": "error", // Enabled in stylistic
// "@typescript-eslint/explicit-function-return-type": "error",
// "@typescript-eslint/explicit-member-accessibility": "error",
// "@typescript-eslint/explicit-module-boundary-types": "error",
"@typescript-eslint/init-declarations": "error",
// "@typescript-eslint/init-declarations": "error",
// "@typescript-eslint/max-params": "error",
// "@typescript-eslint/member-ordering": "error",
// "@typescript-eslint/method-signature-style": "error",
Expand Down
6 changes: 3 additions & 3 deletions examples/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ export default {
],
},
output: {
clean: true,
filename: "[name].bundle.js",
path: resolve(__dirname, "webpacked"),
library: "[name]",
libraryTarget: "umd",
path: resolve(__dirname, "webpacked"),
clean: true,
},
plugins: [
new HtmlWebpackPlugin({
Expand All @@ -61,11 +61,11 @@ export default {
}),
],
resolve: {
extensions: [".ts", ".tsx", ".js"],
extensionAlias: {
".js": [".ts", ".tsx", ".js"],
".mjs": [".mts", ".mtsx", ".mjs"],
},
extensions: [".ts", ".tsx", ".js"],
// fallback: { "events": require.resolve("events/") }
},
};
Loading