chore: Run prettier

This commit is contained in:
Ashhhleyyy 2022-07-07 10:14:45 +01:00
parent d5ef78427c
commit 6bc40ed080
Signed by: ash
GPG key ID: 83B789081A0878FB
5 changed files with 25 additions and 45 deletions

View file

@ -1,27 +1,24 @@
module.exports = { module.exports = {
"env": { env: {
"browser": true, browser: true,
"es2021": true es2021: true,
}, },
"extends": [ extends: [
"eslint:recommended", 'eslint:recommended',
"plugin:react/recommended", 'plugin:react/recommended',
"plugin:@typescript-eslint/recommended", 'plugin:@typescript-eslint/recommended',
"plugin:react/jsx-runtime", 'plugin:react/jsx-runtime',
], ],
"parser": "@typescript-eslint/parser", parser: '@typescript-eslint/parser',
"parserOptions": { parserOptions: {
"ecmaFeatures": { ecmaFeatures: {
"jsx": true, jsx: true,
}, },
"ecmaVersion": "latest", ecmaVersion: 'latest',
"sourceType": "module", sourceType: 'module',
}, },
"plugins": [ plugins: ['react', '@typescript-eslint'],
"react", rules: {
"@typescript-eslint", '@typescript-eslint/no-non-null-assertion': 'off',
],
"rules": {
"@typescript-eslint/no-non-null-assertion": "off",
}, },
} };

View file

@ -1,9 +1,6 @@
import './App.css'; import './App.css';
import Board from './components/Board'; import Board from './components/Board';
import { import { parseFEN, START_FEN } from './utils/board';
parseFEN,
START_FEN,
} from './utils/board';
function App() { function App() {
const startState = parseFEN(START_FEN); const startState = parseFEN(START_FEN);

View file

@ -1,11 +1,6 @@
import { FC, Fragment, useCallback, useMemo, useState } from 'react'; import { FC, Fragment, useCallback, useMemo, useState } from 'react';
import { encodeFEN, eq, GameState, isChecked } from '../utils/board'; import { encodeFEN, eq, GameState, isChecked } from '../utils/board';
import { import { filterMoves, generateLegalMoves, makeMove, Move } from '../utils/move';
filterMoves,
generateLegalMoves,
makeMove,
Move,
} from '../utils/move';
import { getType, otherSide } from '../utils/piece'; import { getType, otherSide } from '../utils/piece';
import styles from './Board.module.css'; import styles from './Board.module.css';
import Piece from './Piece'; import Piece from './Piece';
@ -44,9 +39,7 @@ const Board: FC<Props> = (props) => {
const [enPassantTarget, setEnPassantTarget] = useState( const [enPassantTarget, setEnPassantTarget] = useState(
props.state.enPassantTarget props.state.enPassantTarget
); );
const [halfmoveClock] = useState( const [halfmoveClock] = useState(props.state.halfmoveClock);
props.state.halfmoveClock
);
const [fullmoveNumber, setFullmoveNumber] = useState( const [fullmoveNumber, setFullmoveNumber] = useState(
props.state.fullmoveNumber props.state.fullmoveNumber
); );

View file

@ -1,12 +1,5 @@
import { import { generatePseudolegalMoves } from './move';
generatePseudolegalMoves, import { BoardPiece, pieceFromChar, Side, toAlgebraicChar } from './piece';
} from './move';
import {
BoardPiece,
pieceFromChar,
Side,
toAlgebraicChar,
} from './piece';
export interface Coordinate { export interface Coordinate {
rank: number; rank: number;

View file

@ -8,6 +8,6 @@ export default defineConfig({
server: { server: {
hmr: { hmr: {
clientPort: parseInt(process.env.CLIENT_PORT || '3000'), clientPort: parseInt(process.env.CLIENT_PORT || '3000'),
} },
} },
}); });