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 = {
"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',
},
}
};

View file

@ -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);

View file

@ -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
);

View file

@ -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;

View file

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