Skip to content

Commit

Permalink
Merge pull request #68 from SandroMiguel/fix/eslint-version
Browse files Browse the repository at this point in the history
fix(setup-dependencies.mjs): force eslint@^8
  • Loading branch information
SandroMiguel authored Apr 18, 2024
2 parents 0d96d34 + 87d8e47 commit 292da53
Show file tree
Hide file tree
Showing 5 changed files with 1,833 additions and 939 deletions.
6 changes: 3 additions & 3 deletions bin/setup-dependencies.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ const readLineInterface = readline.createInterface({
})

readLineInterface.question(
'Install dependencies with npm (1) or yarn (2) ? (1/2) ',
'Install dependencies with npm(1) or yarn(2) ? (1/2) ',
(userInput) => {
let install
if (userInput.toLowerCase() === '1') {
install = exec(
'npm i -D eslint prettier eslint-config-prettier eslint-plugin-prettier eslint-config-airbnb eslint-plugin-import eslint-plugin-jsdoc eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-unicorn',
'npm i -D eslint@^8 prettier eslint-config-prettier eslint-plugin-prettier eslint-config-airbnb eslint-plugin-import eslint-plugin-jsdoc eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-unicorn',
)
} else if (userInput.toLowerCase() === '2') {
install = exec(
'yarn add --dev eslint prettier eslint-config-prettier eslint-plugin-prettier eslint-config-airbnb eslint-plugin-import eslint-plugin-jsdoc eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-unicorn',
'yarn add --dev eslint@^8 prettier eslint-config-prettier eslint-plugin-prettier eslint-config-airbnb eslint-plugin-import eslint-plugin-jsdoc eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-unicorn',
)
}
install.stdout.pipe(process.stdout)
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,21 @@
"devDependencies": {
"@commitlint/cli": "^17.6.6",
"@commitlint/config-conventional": "^17.6.6",
"@types/jest": "^29.5.3",
"@types/jest": "^29.5.12",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.45.0",
"eslint": "^8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsdoc": "^46.4.4",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react": "^7.32.2",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsdoc": "^46.10.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-unicorn": "^48.0.0",
"eslint-plugin-unicorn": "^48.0.1",
"husky": "^8.0.3",
"jest": "^29.6.1",
"prettier": "^3.0.0",
"jest": "^29.7.0",
"prettier": "^3.2.5",
"react": "^18.2.0"
}
}
9 changes: 9 additions & 0 deletions rules/jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,14 @@ module.exports = {

// Requires that @returns tag has type value
'jsdoc/require-returns-type': 'warn',

// Enforce no abbreviations
'unicorn/prevent-abbreviations': 'off',

// Enforce no array for each
'unicorn/no-array-for-each': 'off',

// Enforce no array reduce
'unicorn/no-array-reduce': 'off',
},
}
1 change: 1 addition & 0 deletions rules/unicorn.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ module.exports = {
extends: ['plugin:unicorn/recommended'],
rules: {
'unicorn/filename-case': 0,
'unicorn/prevent-abbreviations': 0,
},
}
Loading

0 comments on commit 292da53

Please sign in to comment.