Skip to content

Commit

Permalink
feat(eslint): unused vars are error now
Browse files Browse the repository at this point in the history
  • Loading branch information
sixmen committed Dec 21, 2023
1 parent 94e7cf6 commit 2a10818
Show file tree
Hide file tree
Showing 7 changed files with 4,131 additions and 106 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/eslint-config-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release eslint-config

on:
push:
branches:
- main
paths:
- TypeScript/eslint/**
workflow_dispatch:

jobs:
release:
name: Release eslint-config
runs-on: ubuntu-latest
defaults:
run:
working-directory: TypeScript/eslint

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install Dependencies
run: npm install

- name: Create Release Pull Request or Publish to npm
uses: changesets/action@v1
with:
version: npm run changeset version
publish: npm run release
cwd: ./TypeScript/eslint
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
createGithubReleases: false
8 changes: 8 additions & 0 deletions TypeScript/eslint/.changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions TypeScript/eslint/.changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions TypeScript/eslint/.changeset/lazy-carrots-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@croquiscom/eslint-config': minor
---

unused vars are error now
4 changes: 2 additions & 2 deletions TypeScript/eslint/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ module.exports = {
// 불필요한 조건문 / operators를 사용하지 않는다
'@typescript-eslint/no-unnecessary-condition': ['error', { allowConstantLoopConditions: true }],

// 사용하지 않는 변수를 경고한다. 단 _로 시작하는 변수는 무시한다.
// 사용하지 않는 변수를 허용하지 않는다. 단 _로 시작하는 변수는 무시한다.
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
'error',
{
ignoreRestSiblings: true,
varsIgnorePattern: '^_',
Expand Down
Loading

0 comments on commit 2a10818

Please sign in to comment.