
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
@thyi/eslint-config
Advanced tools
A comprehensive, modern ESLint configuration for JavaScript and TypeScript projects with React support
This configuration includes opinionated settings for:
@typescript-eslint
eslint-plugin-import
# npm
npm install --save-dev @thyi/eslint-config
# pnpm (recommended)
pnpm add -D @thyi/eslint-config
# yarn
yarn add --dev @thyi/eslint-config
Create an eslint.config.js
file in your project root:
import config from '@thyi/eslint-config'
export default config
For TypeScript projects, ensure you have a tsconfig.json
file, then use the same configuration:
import config from '@thyi/eslint-config'
export default config
The configuration automatically detects TypeScript files and applies appropriate rules.
If you want to run eslint from the command line, add these scripts to your package.json
:
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"lint:check": "eslint . --max-warnings 0"
}
}
To override or extend rules, modify your eslint.config.js
:
import baseConfig from '@thyi/eslint-config'
export default [
...baseConfig,
{
rules: {
// Override specific rules
'no-console': 'error',
'@typescript-eslint/no-unused-vars': 'error',
// Disable rules you don't want
'react-native/no-inline-styles': 'off'
}
}
]
Ensure your tsconfig.json
is properly configured:
{
"compilerOptions": {
"target": "ES2022",
"lib": ["ES2022"],
"module": "ESNext",
"moduleResolution": "node",
"jsx": "react-jsx",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}
The configuration includes intelligent overrides for different file types:
.tsx
, .jsx
) - React-specific rules enabled*.test.*
, *.spec.*
) - Relaxed rules for testing.js
, .cjs
, .mjs
) - TypeScript rules disabledThe configuration automatically ignores common build directories:
.expo/
.next/
build/
dist/
coverage/
html/
node_modules/
babel.config.js
metro.config.js
This ESLint configuration is Prettier-friendly but doesn't enforce Prettier formatting rules. Instead, it:
eslint-config-prettier
to turn off ESLint rules that conflict with PrettierCreate a .prettierrc
file in your project root with your preferred settings:
{
"arrowParens": "always",
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2,
"semi": false,
"endOfLine": "lf",
"trailingComma": "all"
}
Or use any other Prettier configuration format (.prettierrc.js
, prettier.config.js
, etc.).
This approach gives you maximum flexibility while avoiding the performance overhead of running Prettier through ESLint.
Install the ESLint extension
Add these settings to your VS Code settings.json
:
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"[javascript][javascriptreact][typescript][typescriptreact]": {
"editor.formatOnSave": false
},
"eslint.useFlatConfig": true
}
ale
or nvim-lspconfig
with ESLint language serverflycheck-eslint
with flat config supportEnsure you're using ESLint v8.21.0 or higher and your config file is named eslint.config.js
.
Make sure your tsconfig.json
is valid and includes all TypeScript files you want to lint.
The config includes TypeScript and Node.js import resolvers. For custom path mapping, update your tsconfig.json
with proper paths
configuration.
For large projects, consider using projectService
in your TypeScript parser options or implementing incremental linting.
Issues and pull requests are welcome! Please ensure your contributions:
MIT © Theodros Yimer
FAQs
ESLint Config for JavaScript, Typescript, React, React Native
The npm package @thyi/eslint-config receives a total of 2 weekly downloads. As such, @thyi/eslint-config popularity was classified as not popular.
We found that @thyi/eslint-config 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.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.