-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2. use scss 3. format code
- Loading branch information
Showing
12 changed files
with
2,710 additions
and
822 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// mimic CommonJS variables -- not needed if using CommonJS | ||
module.exports = { | ||
root: true, | ||
parser: "@babel/eslint-parser", | ||
parserOptions: { | ||
ecmaVersion: 2021, | ||
sourceType: "module", | ||
}, | ||
ignorePatterns: ["*.d.ts"], | ||
overrides: [ | ||
{ | ||
files: ["*.ts", "*.tsx"], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
ecmaVersion: 2021, | ||
sourceType: "module", | ||
project: "./tsconfig.json", | ||
}, | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
], | ||
plugins: ["@typescript-eslint"], | ||
rules: { | ||
eqeqeq: "error", | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
args: "all", | ||
argsIgnorePattern: "^_", | ||
caughtErrors: "all", | ||
caughtErrorsIgnorePattern: "^_", | ||
destructuredArrayIgnorePattern: "^_", | ||
varsIgnorePattern: "^_", | ||
ignoreRestSiblings: true, | ||
}, | ||
], | ||
"prefer-const": ["error", { ignoreReadBeforeAssign: true }], | ||
semi: "error", | ||
quotes: ["error", "single"], | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint", | ||
"editor.formatOnType": false, // required | ||
"editor.formatOnPaste": true, // optional | ||
"editor.formatOnSave": true, // optional | ||
"editor.formatOnSaveMode": "file", // required to format on save | ||
"files.autoSave": "onFocusChange", // optional but recommended | ||
"vs-code-prettier-eslint.prettierLast": true, // set as "true" to run 'prettier' last not first | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"typescript", | ||
"typescriptreact" | ||
], | ||
"FSharp.excludeProjectDirectories": [ | ||
".git", | ||
"paket-files", | ||
".fable", | ||
"packages", | ||
"node_modules" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1 @@ | ||
type CellEntity = { | ||
x: number; | ||
y: number; | ||
groupId: number; | ||
groupX: number; | ||
groupY: number; | ||
color: string; | ||
cellId: string; | ||
cubeType: CUBE_TYPE; | ||
rotation: ROTATION_TYPE; | ||
}; | ||
type CellPosition = { | ||
x: number; | ||
y: number; | ||
}; | ||
type CubeBody = { | ||
name: string; | ||
bodyArray: (type: ROTATION_TYPE) => CellPosition[]; | ||
startY: number; | ||
color: string; | ||
previewSize: number; | ||
}; | ||
type CubeDescription = { | ||
[key in CUBE_TYPE]: CubeBody; | ||
}; | ||
declare enum CUBE_TYPE { | ||
CUBE1 = "S", | ||
CUBE2 = "T", | ||
CUBE3 = "I", | ||
CUBE4 = "L", | ||
CUBE5 = "Z", | ||
CUBE6 = "O", | ||
CUBE7 = "J" | ||
} | ||
declare enum ROTATION_TYPE { | ||
TYPE1 = "type1", | ||
TYPE2 = "type2", | ||
TYPE3 = "type3", | ||
TYPE4 = "type4" | ||
} | ||
declare enum MOVE_DIRECTION { | ||
LEFT = "left", | ||
DOWN = "down", | ||
RIGHT = "right", | ||
UP = "up" | ||
} | ||
type CubeAndType = { | ||
cubeItem?: CubeBody; | ||
cubeType?: CUBE_TYPE; | ||
}; | ||
import './styles/index.scss'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.