Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
yomotsu committed Dec 21, 2024
1 parent 582c9be commit f9b9ac1
Show file tree
Hide file tree
Showing 4 changed files with 2,211 additions and 1,680 deletions.
4 changes: 2 additions & 2 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"src/**/*": "npx eslint --ext .ts --fix"
}
"src/**/*": "npx eslint src --fix"
}
122 changes: 122 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
import globals from "globals";
import tsPlugin from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import styPlugin from "@stylistic/eslint-plugin";

// https://www.npmjs.com/package/eslint-config-mdcs
const mdcs = {
globals: {
THREE: "readonly",
console: "writable",
},

rules: {
"array-bracket-spacing": [
"error",
"always",
{ singleValue: true, arraysInArrays: false }
],
"block-spacing": [ "error", "always" ],
"brace-style": [ "error", "1tbs", { allowSingleLine: true } ],
"comma-spacing": [ "error", { before: false, after: true } ],
"comma-style": [ "error", "last" ],
"computed-property-spacing": [ "error", "always" ],
"eol-last": [ "error", "always" ],
"func-call-spacing": [ "error", "never" ],
"indent": [ "error", "tab", { SwitchCase: 1 } ],
"key-spacing": [ "error", { beforeColon: false } ],
"new-parens": "error",
"no-trailing-spaces": [ "error", { skipBlankLines: false } ],
"no-whitespace-before-property": "error",
"object-curly-spacing": [ "error", "always" ],
"padded-blocks": [
"error",
{
blocks: "always",
switches: "always",
classes: "always"
}
],
"semi": [
"error",
"always",
{ "omitLastInOneLineBlock": true }
],
"semi-spacing": [ "error", { before: false, after: true } ],
"space-before-blocks": [ "error", {
functions: "always",
keywords: "always",
classes: "always"
} ],
"space-before-function-paren": [
"error",
{
anonymous: "always",
named: "never",
asyncArrow: "ignore"
}
],
"space-in-parens": [ "error", "always" ],
"space-infix-ops": [ "error" ],
"space-unary-ops": [
"error",
{
words: true,
nonwords: true,
overrides: {}
}
],
"keyword-spacing": [ "error", { before: true, after: true } ],
"padding-line-between-statements": [
"error",
{ blankLine: "always", prev: "block-like", next: "*" }
],
"no-multi-spaces": "error",
"no-undef": "warn",
"no-unused-vars": "warn",
"no-extra-semi": "warn"
}
};

export default [
{
files: [ "src/**/*.ts" ],
// ignores: [],
languageOptions: {
parser: tsParser,
globals: {
...globals.browser,
...globals.node,
...mdcs.globals,
},
},

plugins: {
"@typescript-eslint": tsPlugin,
"@stylistic": styPlugin,
},

rules: {
...mdcs.rules,
"no-unused-vars": 0,
"@typescript-eslint/no-unused-vars": 1,
"indent": 0,
"@stylistic/indent": [
"error",
"tab",
{
SwitchCase: 1,
flatTernaryExpressions: true,
},
],
"no-multi-spaces": [ 0 ],
"no-trailing-spaces": [
"error",
{
ignoreComments: true,
},
],
"key-spacing": [ 0 ],
},
},
];
Loading

0 comments on commit f9b9ac1

Please sign in to comment.