
Security News
Critical Security Vulnerability in React Server Components
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.
@lintest/cli
Advanced tools
Copyright 2020. mornya. All rights reserved.
Integrated lint and test environment project.
ํด๋น ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ ๊ธ๋ก๋ฒ๋ก ์ค์นํ๊ฑฐ๋ ํ๋ก์ ํธ ๋ด์ ์ค์นํ ์ ์๋ค.
npm๋์yarn์ฌ์ฉ์, ํ๋ก์ ํธ ๋ฃจํธ ๊ฒฝ๋ก์package-lock.jsonํ์ผ์ด ์กด์ฌํ๋ฉด ์ ๊ฑฐํ๊ณyarn.lockํ์ผ๋ง ์ฐธ์กฐ๋๋๋ก ํ๋ค.
$ npm install --save-dev @lintest/cli
or
$ yarn add -D @lintest/cli
๊ธ๋ก๋ฒ ์ค์น๋ฅผ ์ํด์๋ ์๋์ ๊ฐ์ด ์คํํ๋ค.
$ npm install -g @lintest/cli
or
$ yarn global add @lintest/cli
lintest ํ๊ฒฝ์ค์ ์ ํ๋ก์ ํธ ๋ฃจํธ ๊ฒฝ๋ก์ lintest.config.js ํ์ผ๋ก ์์ฑํ๋ฉด ๋๋ค.
ํด๋น ํ์ผ์ด ์กด์ฌํ๋ฉด lintest install ๋ช
๋ น ์ํ์ providerํญ๋ชฉ์ผ๋ก ์ง์ ๋ ๋ํ๋์๊ฐ ํ๋ก์ ํธ์ ์ค์น๋๋ฉฐ, ๋ฆฐํธ ๋ฃฐ์ ํด๋น ๋ํ๋์ ์ค์ ์ ๋ฐ๋ฅด๊ฒ ๋๋ค.
// lintest.config.js
module.exports = {
provider: 'sample',
}
์์ ๊ฐ์ด ์ค์ ํ๋ฉด lintest install ๋ช
๋ น ์คํ์ @lintest/rules-sample ๋ํ๋์๊ฐ ํ๋ก์ ํธ ๋ด ์ค์น๊ฐ ๋๋ฉฐ lint rule์ ํด๋น ๋ํ๋์ ๋ด ์ค์ ์ ๋ฐ๋ฅธ๋ค.
scripts.postinstall ํญ๋ชฉ์ lintest install์ ์ถ๊ฐ๋ก ์ง์ ํ์ฌ npm install ๋ช
๋ น์ด ์คํ๋ ๋๋ง๋ค ํด๋น ํญ๋ชฉ์ด ์คํ๋ ์ ์๋๋ก ์ค์ ํ๋ค.
{
"scripts": {
"postinstall": "lintest install"
}
}
๋ฆฐํธ ๋ฐ ํ ์คํธ ์ํ์ CLI๋ก ์คํํ๋ค. lintest๊ฐ ๊ธ๋ก๋ฒ ๋ชจ๋๋ก ์ค์น ๋์ด์๋ ๊ฒฝ์ฐ ์ปค๋งจ๋๋ผ์ธ์์ ์๋์ ๊ฐ์ด ์คํ ํ ์ ์๋ค.
# ๋ฆฐํธ ์คํ์
$ lintest lint [fix|debug]
# ํ
์คํธ ์คํ์
$ lintest test [watch|coverage]
์ ํ๋ฆฌ์ผ์ด์
๋ด์์ ๋ฆฐํธ ๋ฐ ํ
์คํธ ํ๊ฒฝ์ค์ ๋ด์ฉ์ด ํ์ํ ๊ฒฝ์ฐ export ๋ช
๋ น์ ์ฌ์ฉํ์ฌ ์์ฑ๋ ํ๊ฒฝ์ค์ ํ์ผ์ ์ฐธ์กฐํ๋ค.
์ํ๊ฒฐ๊ณผ๋ ./node_modules/.cache/lintest ํ์ ๊ฒฝ๋ก์ ํ์ผ์ด ์์ฑ๋๋ค.
ํ๊ฒฝ์ค์ ๋ฐ ์คํํ์ผ์ ๊ฒฝ๋ก ์ ๋ณด ๋ฑ์ด ํฌํจ๋์ด ์๋ค.
$ lintest export
NPM ํ๋ก์ ํธ์์๋ npm run ๋ช
๋ น์ผ๋ก ์คํ๋๋๋ก ์๋์ ๊ฐ์ด package.json ํ์ผ ๋ด์ ์ค์ ํ๋ค.
{
"scripts": {
"lint": "lintest lint",
"lint:fix": "lintest lint fix",
"lint:debug": "lintest lint debug",
"test": "lintest test",
"test:watch": "lintest test watch",
"test:coverage": "lintest test coverage"
}
}
๊ฐ ๋จ์ ํ ์คํธ๋ฅผ ์ํํ๊ธฐ ์ mocking method๋ ์ด๊ธฐ ์ค์ ์ ํ ์ ์๋๋ก ์ ์ ํ์ผ์ ์ถ๊ฐ ํ ์ ์๋ค. ์ ์ฉ๋ ํ ์คํธ ์ ์ ํ์ผ์ ์๋ ๋ชฉ๋ก์์ ์กด์ฌํ๋ ํ์ผ์ ์ฐพ์ ์ฌ์ฉํ๊ฒ ๋๋ค.
์์ธํ ๋ด์ฉ์ Jest ๊ด๋ จ ๋ฌธ์๋ฅผ ์ฐธ๊ณ .
<rootDir>/src/test/@setup.ts (or .js)
<rootDir>/test/@setup.ts (or .js)
<rootDir>/test-setup.ts (or .js)
main ํ์ผ์ ์๋์ ๊ฐ์ ํํ์ lint rule ์ ์ ํ์ผ๋ง ํ์ํ๋ค.
lintRules ํ์ ํญ๋ชฉ์ ๋ฃฐ๋ค์ prefix๋ฅผ ๋ถ์ด์ง ์์๋ ๋๋ค.
typescript ํญ๋ชฉ์ '@typescript-eslint/indent' ๋ฃฐ์ ์ ์ํ ๋ '@typescript-eslint/'๋ ๊ตณ์ด ๋ถ์ฌ์ฃผ์ง ์์๋ 'typescript' ํญ๋ชฉ ํ์์ ์ ์ธํ๋ฉด prefix๋ '@typescript-eslint/'๋ก ์๋ ๊ณ ์ ๋๋ค.
// index.js
module.exports = {
lintRules: {
general: {
'comma-dangle': 'off',
'no-console': 'off',
'no-debugger': 'off',
},
typescript: {
'@typescript-eslint/indent': ['error', 2],
},
react: {
'react/jsx-boolean-value': 'off',
'jsx-wrap-multilines': 'off',
},
vue: {
'attribute-hyphenation': 'off',
'vue/html-closing-bracket-spacing': 'off',
'vue/html-indent': ['error', 2],
'html-self-closing': 'off',
},
unicorn: {
'escape-case': 'error',
},
},
}
ํด๋น ํ๋ก์ ํธ์ ๋ณ๊ฒฝ์ฌํญ์ CHANGELOG.md ํ์ผ ์ฐธ์กฐ.
ํด๋น ํ๋ก์ ํธ์ ๋ผ์ด์ผ์ค๋ LICENSE ํ์ผ ์ฐธ์กฐ.
FAQs
Integrated lint and test environment project
We found that @lintest/cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.

Research
/Security News
We spotted a wave of auto-generated โelf-*โ npm packages published every two minutes from new accounts, with simple malware variants and early takedowns underway.

Security News
TypeScript 6.0 will be the last JavaScript-based major release, as the project shifts to the TypeScript 7 native toolchain with major build speedups.