chore: Run prettier
This commit is contained in:
parent
d5ef78427c
commit
6bc40ed080
5 changed files with 25 additions and 45 deletions
39
.eslintrc.js
39
.eslintrc.js
|
@ -1,27 +1,24 @@
|
|||
module.exports = {
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es2021": true
|
||||
env: {
|
||||
browser: true,
|
||||
es2021: true,
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:react/recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:react/jsx-runtime",
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:react/recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:react/jsx-runtime',
|
||||
],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaFeatures": {
|
||||
"jsx": true,
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
ecmaFeatures: {
|
||||
jsx: true,
|
||||
},
|
||||
"ecmaVersion": "latest",
|
||||
"sourceType": "module",
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
},
|
||||
"plugins": [
|
||||
"react",
|
||||
"@typescript-eslint",
|
||||
],
|
||||
"rules": {
|
||||
"@typescript-eslint/no-non-null-assertion": "off",
|
||||
plugins: ['react', '@typescript-eslint'],
|
||||
rules: {
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
},
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
import './App.css';
|
||||
import Board from './components/Board';
|
||||
import {
|
||||
parseFEN,
|
||||
START_FEN,
|
||||
} from './utils/board';
|
||||
import { parseFEN, START_FEN } from './utils/board';
|
||||
|
||||
function App() {
|
||||
const startState = parseFEN(START_FEN);
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
import { FC, Fragment, useCallback, useMemo, useState } from 'react';
|
||||
import { encodeFEN, eq, GameState, isChecked } from '../utils/board';
|
||||
import {
|
||||
filterMoves,
|
||||
generateLegalMoves,
|
||||
makeMove,
|
||||
Move,
|
||||
} from '../utils/move';
|
||||
import { filterMoves, generateLegalMoves, makeMove, Move } from '../utils/move';
|
||||
import { getType, otherSide } from '../utils/piece';
|
||||
import styles from './Board.module.css';
|
||||
import Piece from './Piece';
|
||||
|
@ -44,9 +39,7 @@ const Board: FC<Props> = (props) => {
|
|||
const [enPassantTarget, setEnPassantTarget] = useState(
|
||||
props.state.enPassantTarget
|
||||
);
|
||||
const [halfmoveClock] = useState(
|
||||
props.state.halfmoveClock
|
||||
);
|
||||
const [halfmoveClock] = useState(props.state.halfmoveClock);
|
||||
const [fullmoveNumber, setFullmoveNumber] = useState(
|
||||
props.state.fullmoveNumber
|
||||
);
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
import {
|
||||
generatePseudolegalMoves,
|
||||
} from './move';
|
||||
import {
|
||||
BoardPiece,
|
||||
pieceFromChar,
|
||||
Side,
|
||||
toAlgebraicChar,
|
||||
} from './piece';
|
||||
import { generatePseudolegalMoves } from './move';
|
||||
import { BoardPiece, pieceFromChar, Side, toAlgebraicChar } from './piece';
|
||||
|
||||
export interface Coordinate {
|
||||
rank: number;
|
||||
|
|
|
@ -8,6 +8,6 @@ export default defineConfig({
|
|||
server: {
|
||||
hmr: {
|
||||
clientPort: parseInt(process.env.CLIENT_PORT || '3000'),
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue