Socket
Socket
Sign inDemoInstall

@eduzz/eslint-config

Package Overview
Dependencies
Maintainers
6
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eduzz/eslint-config - npm Package Compare versions

Comparing version 2.0.0-beta.7 to 2.0.0

2

.prettierrc.js

@@ -11,3 +11,3 @@ module.exports = {

arrowParens: 'avoid',
endOfLine: 'lf',
endOfLine: 'auto',
printWidth: 120,

@@ -14,0 +14,0 @@ semi: true,

@@ -45,3 +45,9 @@ const pluginImport = require('eslint-plugin-import');

],
'linebreak-style': ['error', 'unix'],
'no-restricted-syntax': [
'error',
{
selector: 'VariableDeclarator > Identifier[name=/^process/i]',
message: 'process is a reserved name for NodeJS Enviroment'
}
],
'max-lines': ['error', 300],

@@ -48,0 +54,0 @@ 'max-len': ['off'],

@@ -1,2 +0,2 @@

const children = require('child_process');
const childProcess = require('child_process');
const fs = require('node:fs');

@@ -6,5 +6,5 @@

module.exports = function gitignore(extra = []) {
const files = children
.execSync("git ls-files '*.gitignore'")
module.exports = function gitignore(...extra) {
const files = childProcess
.execSync('git ls-files *.gitignore')
.toString()

@@ -27,2 +27,3 @@ .split('\n')

const globs = parsed.globs();
console.log(JSON.stringify(globs, null, 2));

@@ -29,0 +30,0 @@ for (const glob of globs) {

{
"name": "@eduzz/eslint-config",
"private": false,
"version": "2.0.0-beta.7",
"version": "2.0.0",
"keywords": [

@@ -28,19 +28,18 @@ "eduzz",

"@eduzz/eslint-config": "^2.0.0-beta.0",
"@types/eslint": "^8.56.7",
"eslint": "^8",
"@types/eslint": "^8.56.10",
"eslint": "^9",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-eslint-plugin": "^5.5.0",
"eslint-plugin-eslint-plugin": "^6.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-native": "^4.1.0",
"eslint-plugin-unused-imports": "^3.1.0",
"eslint-plugin-react": "^7.34.2",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-unused-imports": "^4.0.0",
"parse-gitignore": "^2.0.0",
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.5.13",
"typescript-eslint": "^7.5.0"
"prettier": "^3.3.0",
"prettier-plugin-tailwindcss": "^0.6.1",
"typescript-eslint": "^7.11.0"
},
"devDependencies": {
"typescript": "^5.4.4"
"typescript": "^5.4.5"
},

@@ -47,0 +46,0 @@ "peerDependencies": {},

const { configs } = require('./react');
const pluginReactNative = require('eslint-plugin-react-native');

@@ -8,16 +7,3 @@ const ignores = require('./ignores');

ignores,
/** @type import('eslint').Linter.FlatConfig[] */
configs: [
...configs,
{
name: '@eduzz/eslint-config-react-native',
plugins: {
'react-native': pluginReactNative
},
rules: {
'react-native/no-inline-styles': ['warn'],
'react-native/no-unused-styles': ['error']
}
}
]
configs
};

@@ -5,46 +5,19 @@ # ESLint Config

## Migração
Se está migrando do `@eduzz/eslint-config-houston` altere as configurações do `.eslintrc [extends]` para:
* `@eduzz/eslint-config-houston` >> `@eduzz/eslint-config/react`
* `@eduzz/eslint-config-houston/native` >> `@eduzz/eslint-config/react-native`
* `@eduzz/eslint-config-houston/node` >> `@eduzz/eslint-config`
## Instalação
Para configurar no padrão da Eduzz, primerio você deve adicionar as dependências, pois o eslint exige que plugins devem,
ser adicionados no projeto principal
### Javascript / Typescript / Node
```sh
yarn add --dev @eduzz/eslint-config eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-prettier eslint-plugin-eslint-plugin eslint-plugin-import eslint-plugin-prettier eslint-plugin-unused-imports prettier
yarn add --dev @eduzz/eslint-config
```
1. `eslint.config.js`
```js
// .eslintrc
{
"extends": ["@eduzz/eslint-config"]
}
const { ignores, configs } = require('@eduzz/eslint-config'); // Javascript / Typescript / Node
const { ignores, configs } = require('@eduzz/eslint-config/react'); // React
const { ignores, configs } = require('@eduzz/eslint-config/react-native'); // React Native
// .prettierrc.js
module.exports = {
...require('@eduzz/eslint-config/.prettierrc')
};
/** @type import('eslint').Linter.FlatConfig[] */
module.exports = [...configs, { ignores: ignores() }];
```
### React
```sh
yarn add --dev @eduzz/eslint-config eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-prettier eslint-plugin-eslint-plugin eslint-plugin-import eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-unused-imports prettier
```
2. `.prettierrc.js`
```js
// .eslintrc
{
"extends": ["@eduzz/eslint-config/react"]
}
// .prettierrc.js
module.exports = {

@@ -55,22 +28,13 @@ ...require('@eduzz/eslint-config/.prettierrc')

### React Native
## Configurações Extras
```sh
yarn add --dev @eduzz/eslint-config eslint eslint-plugin-react-native @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-prettier eslint-plugin-eslint-plugin eslint-plugin-import eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-unused-imports prettier
```
### Ignore
Por padrão todos os arquivos do `.gitignore` já são removidos, caso queira adicionar mais:
```js
// .eslintrc
{
"extends": ["@eduzz/eslint-config/react-native"]
}
// .prettierrc.js
module.exports = {
...require('@eduzz/eslint-config/.prettierrc')
};
/** @type import('eslint').Linter.FlatConfig[] */
module.exports = [...configs, { ignores: ignores('**/ignore/**.js', 'ignore.js') }];
```
## Configurações Extras
### VSCode

@@ -77,0 +41,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc