
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@platosedu/eslint-config
Advanced tools
Eslint configuration used across all JavaScript/Typescript projects at Platos Edu
Eslint configuration with Typescript and Prettier support by default. This settings is used across all JavaScript/Typescript projects at Platos Educational.
npm:
npm install --save-dev eslint @platosedu/eslint-config prettier
yarn:
yarn add dev @platosedu/eslint-config prettier
.prettierrc.json
{
"trailingComma": "none",
"semi": false,
"singleQuote": true,
"endOfLine": "auto"
}
.vscode/settings.json
This settings is needed to automatize code formatting when a file is saved
{
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.tslint": true,
"source.fixAll.stylelint": true
}
}
.eslintrc.json
{
"extends": [
"@platosedu/eslint-config"
],
"env": {
"node": true
}
}
.eslintrc.json
{
"extends": [
"@platosedu/eslint-config"
],
"env": {
"browser": true
}
}
npm:
npm install --save-dev babel-plugin-module-resolver
yarn:
yarn add dev babel-plugin-module-resolver
.eslintrc.json
{
"extends": ["@platosedu/eslint-config/react"],
"env": {
"browser": true
},
"settings": {
"import/resolver": {
"babel-module": {
"root": ["./src/"]
}
}
}
}
.editorconfig
root = true
[*]
indent_style = spaces
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
This eslint settings was setted up to support typescript by default.
In order to support typescript on your project, you will need your own typescript config with your preferences. See below an example.
tsconfig.json
{
"compilerOptions": {
"allowJs": true,
"alwaysStrict": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"jsx": "preserve",
"lib": ["dom", "es2017"],
"module": "esnext",
"moduleResolution": "node",
"noEmit": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "esnext"
},
"exclude": ["node_modules"],
"include": ["**/*.ts", "**/*.tsx"]
}
To support a customized base path for imports you need to add the baseUrl
option on your tsconfig.json
file. See below:
{
"compilerOptions": {
"allowJs": true,
"alwaysStrict": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"jsx": "preserve",
"lib": ["dom", "es2017"],
"module": "esnext",
"moduleResolution": "node",
"noEmit": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "esnext",
"baseUrl": "./src"
},
"exclude": ["node_modules"],
"include": ["**/*.ts", "**/*.tsx"]
}
FAQs
Eslint configuration used across all JavaScript/Typescript projects at Platos Edu
We found that @platosedu/eslint-config demonstrated a not healthy version release cadence and project activity because the last version was released 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.