nickytonline/connect-four

Add /dist directory to eslint and prettier ignore files

nickytonline opened this issue · 3 comments

Description

Currently if a dist folder is present from a build, it raises warnings in eslint and prettier and potentially errors in eslint. This folder is a build artifact so there is no need for prettier and eslint to run on this folder. Add it to both eslint and prettier's ignore files.

In .prettierignore

.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock

/coverage
/.github
/.netlify
/.vscode
+ /dist

and in .eslintignore

.DS_Store
node_modules
/build
+ /dist
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
/coverage

Success Criteria

  1. Run npm run build
  2. Run npm run format once the changes have been made and you should no longer see references to the dist folder, e.g.
> connect-four@1.0.0 format
> prettier --plugin-search-dir . --write .

.eslintrc.cjs 28ms
.gitpod.yml 16ms
.lintstagedrc.cjs 2ms
.prettierrc 5ms
.storybook/main.cjs 3ms
.storybook/preview-head.html 15ms
.storybook/preview.cjs 4ms
CODE-OF-CONDUCT.md 38ms
CONTRIBUTING.md 5ms
dist/_app/immutable/assets/_page-4d4a7d51.css 19ms
dist/_app/immutable/chunks/0-c75aa4ae.js 2ms
dist/_app/immutable/chunks/1-addd541e.js 1ms
dist/_app/immutable/chunks/2-39fe2eeb.js 2ms
dist/_app/immutable/chunks/index-285718c9.js 8ms
dist/_app/immutable/chunks/index-9de25212.js 46ms
dist/_app/immutable/chunks/singletons-71473c1a.js 12ms
dist/_app/immutable/components/error.svelte-5e9b940e.js 16ms
dist/_app/immutable/components/layout.svelte-3764221b.js 5ms
dist/_app/immutable/components/pages/_page.svelte-a4d750da.js 29ms
dist/_app/immutable/start-ee72f848.js 105ms
dist/_app/version.json 3ms
dist/vite-manifest.json 2ms
package.json 3ms
playwright.config.ts 163ms
README.md 18ms
src/app.d.ts 4ms
src/app.html 6ms
src/lib/Board.svelte 69ms
src/lib/Coin.svelte 6ms
src/lib/stores/gameState.ts 4ms
src/routes/+page.svelte 6ms
src/stories/button.css 3ms
src/stories/Button.stories.js 4ms
src/stories/Button.svelte 8ms
src/stories/header.css 2ms
src/stories/Header.stories.js 2ms
src/stories/Header.svelte 8ms
src/stories/Introduction.stories.mdx 16ms
src/stories/page.css 4ms
src/stories/Page.stories.js 3ms
src/stories/Page.svelte 10ms
src/types/GameTypes.d.ts 1ms
svelte.config.js 2ms
tests/test.ts 4ms
testSpec.spec.ts 2ms
tsconfig.json 1ms
vite.config.ts 4ms
  1. Run npm run lint once the changes have been made and you should no longer see references to the dist folder, e.g.
➜ npm run lint

> connect-four@1.0.0 lint
> prettier --plugin-search-dir . --check . && eslint .

Checking formatting...
All matched files use Prettier code style!

/Users/nicktaylor/dev/oss/connect-four/dist/_app/immutable/chunks/index-9de25212.js
  1:14  error  Unexpected empty function '$'  @typescript-eslint/no-empty-function

/Users/nicktaylor/dev/oss/connect-four/dist/_app/immutable/components/pages/_page.svelte-a4d750da.js
  142:16  warning  's' is defined but never used  @typescript-eslint/no-unused-vars
  178:6   warning  'a' is defined but never used  @typescript-eslint/no-unused-vars
  181:6   warning  'a' is defined but never used  @typescript-eslint/no-unused-vars
  235:5   warning  's' is defined but never used  @typescript-eslint/no-unused-vars
  241:5   warning  's' is defined but never used  @typescript-eslint/no-unused-vars
  295:5   warning  'n' is defined but never used  @typescript-eslint/no-unused-vars
  301:5   warning  'n' is defined but never used  @typescript-eslint/no-unused-vars
  342:13  warning  'i' is defined but never used  @typescript-eslint/no-unused-vars

/Users/nicktaylor/dev/oss/connect-four/dist/_app/immutable/start-ee72f848.js
   440:16  warning  'w' is defined but never used                 @typescript-eslint/no-unused-vars
   475:5   warning  '_' is defined but never used                 @typescript-eslint/no-unused-vars
   478:5   warning  '_' is defined but never used                 @typescript-eslint/no-unused-vars
   658:7   error    Unexpected lexical declaration in case block  no-case-declarations
   663:7   error    Unexpected lexical declaration in case block  no-case-declarations
   677:7   error    Unexpected lexical declaration in case block  no-case-declarations
   712:9   error    Empty block statement                         no-empty
   757:21  error    Unexpected empty method 'accepted'            @typescript-eslint/no-empty-function
   758:20  error    Unexpected empty method 'blocked'             @typescript-eslint/no-empty-function
   929:23  error    Unexpected empty method 'setHeaders'          @typescript-eslint/no-empty-function
  1002:58  error    Unexpected empty arrow function               @typescript-eslint/no-empty-function
  1003:62  error    Unexpected empty arrow function               @typescript-eslint/no-empty-function
  1060:36  error    Unexpected empty arrow function               @typescript-eslint/no-empty-function
  1203:54  error    Unexpected empty arrow function               @typescript-eslint/no-empty-function
  1304:15  error    Empty block statement                         no-empty
  1394:85  error    'i.href' is assigned to itself                no-self-assign
  1496:15  error    Unexpected empty arrow function               @typescript-eslint/no-empty-function
  1498:26  warning  'r' is defined but never used                 @typescript-eslint/no-unused-vars

@nickytonline , would love to contribute to this this, please assign it to me asap & reqeust to please add 'hacktoberfest' label to this issue

@nickytonline Please review #84

I request to please add 'hacktoberfest-accepted' label to PR post successful review.