Skip to content

chore: move eslint config to rc json file #1091

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": [
"godaddy",
"plugin:jsdoc/recommended-typescript-flavor"
],
"ignorePatterns": [
"node_modules/",
"coverage/"
],
"plugins": [
"unicorn",
"jsdoc"
],
"rules": {
"unicorn/filename-case": "error"
}
}
17 changes: 0 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,6 @@
"syncpack": "^13.0.3",
"typescript": "^5.7.3"
},
"eslintConfig": {
"extends": [
"godaddy",
"plugin:jsdoc/recommended-typescript-flavor"
],
"ignorePatterns": [
"node_modules/",
"coverage/"
],
"plugins": [
"unicorn",
"jsdoc"
],
"rules": {
"unicorn/filename-case": "error"
}
},
"engines": {
"pnpm": ">=8",
"npm": "please-use-pnpm",
Expand Down
35 changes: 35 additions & 0 deletions packages/create-gasket-app/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"extends": [
"godaddy",
"plugin:jest/recommended",
"plugin:jsdoc/recommended-typescript-flavor"
],
"plugins": [
"unicorn",
"jsdoc"
],
"rules": {
"unicorn/filename-case": "error"
},
"overrides": [
{
"files": [
"lib/*.ts"
],
"extends": [
"godaddy-typescript"
],
"rules": {
"jsdoc/require-jsdoc": "off",
"jsdoc/require-param": "off",
"jsdoc/require-returns": "off",
"jsdoc/require-description": "off",
"jsdoc/require-param-type": "off",
"jsdoc/require-returns-description": "off"
}
}
],
"ignorePatterns": [
"test/fixtures"
]
}
7 changes: 7 additions & 0 deletions packages/create-gasket-app/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ const gasketBin = program
.addHelpText('beforeAll', logo);


/**
* Main function to execute the Gasket CLI.
* It suppresses deprecation warnings, processes the create command,
* checks if the package is outdated, adds the command to the Gasket CLI,
* inserts 'create' into the command line arguments, and parses the command.
* @returns {Promise<Command>} A promise that resolves with the parsed command.
*/
async function main() {
// Suppress deprecation warning for punycode in node 22
// @ts-ignore
Expand Down
6 changes: 6 additions & 0 deletions packages/create-gasket-app/lib/scaffold/create-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ function makeCreateRuntime(context, source) {
});
}

/**
* Flattens an array by concatenating the given values to the accumulator.
* @param {Array} acc - The accumulator array that values will be concatenated to.
* @param {Array} values - The array of values to be concatenated.
* @returns {Array} - The resulting array after concatenation.
*/
function flatten(acc, values) {
return acc.concat(values);
}
Expand Down
30 changes: 0 additions & 30 deletions packages/create-gasket-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,36 +68,6 @@
"jest": "^29.7.0",
"typescript": "^5.7.3"
},
"eslintConfig": {
"extends": [
"godaddy",
"plugin:jest/recommended",
"plugin:jsdoc/recommended-typescript-flavor"
],
"plugins": [
"unicorn",
"jsdoc"
],
"rules": {
"unicorn/filename-case": "error"
},
"overrides": [
{
"files": [
"lib/*.ts"
],
"extends": [
"godaddy-typescript"
],
"rules": {
"jsdoc/*": "off"
}
}
]
},
"eslintIgnore": [
"test/fixtures"
],
"jest": {
"transform": {}
}
Expand Down
14 changes: 14 additions & 0 deletions packages/gasket-assets/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": [
"godaddy"
],
"plugins": [
"unicorn"
],
"rules": {
"unicorn/filename-case": "error"
},
"ignorePatterns": [
"react"
]
}
16 changes: 1 addition & 15 deletions packages/gasket-assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,5 @@
"recursive-readdir": "^2.2.3",
"rimraf": "^3.0.2",
"typescript": "^5.7.3"
},
"eslintConfig": {
"extends": [
"godaddy"
],
"plugins": [
"unicorn"
],
"rules": {
"unicorn/filename-case": "error"
}
},
"eslintIgnore": [
"react"
]
}
}
37 changes: 37 additions & 0 deletions packages/gasket-core/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"ignorePatterns": [
"cjs/"
],
"extends": [
"godaddy",
"plugin:jest/recommended",
"plugin:jsdoc/recommended-typescript-flavor"
],
"plugins": [
"unicorn",
"jsdoc"
],
"rules": {
"unicorn/filename-case": "error",
"no-undefined": 0,
"no-sync": 0
},
"overrides": [
{
"files": [
"test/**/*.js"
],
"rules": {
"jsdoc/require-jsdoc": "off"
}
},
{
"files": [
"lib/*.ts"
],
"extends": [
"godaddy-typescript"
]
}
]
}
40 changes: 0 additions & 40 deletions packages/gasket-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,46 +64,6 @@
"jest": "^29.7.0",
"typescript": "^5.7.3"
},
"eslintConfig": {
"ignorePatterns": [
"cjs/"
],
"extends": [
"godaddy",
"plugin:jest/recommended",
"plugin:jsdoc/recommended-typescript-flavor"
],
"plugins": [
"unicorn",
"jsdoc"
],
"rules": {
"unicorn/filename-case": "error",
"no-undefined": 0,
"no-sync": 0
},
"overrides": [
{
"files": [
"test/**/*.js"
],
"rules": {
"jsdoc/require-jsdoc": "off"
}
},
{
"files": [
"lib/*.ts"
],
"extends": [
"godaddy-typescript"
],
"rules": {
"jsdoc/*": "off"
}
}
]
},
"gasket": {
"metadata": {
"lifecycles": [
Expand Down
35 changes: 35 additions & 0 deletions packages/gasket-data/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"ignorePatterns": [
"cjs/"
],
"extends": [
"godaddy",
"plugin:jest/recommended",
"plugin:jsdoc/recommended-typescript-flavor"
],
"plugins": [
"unicorn",
"jsdoc"
],
"rules": {
"unicorn/filename-case": "error"
},
"overrides": [
{
"files": [
"lib/*.ts"
],
"extends": [
"godaddy-typescript"
],
"rules": {
"jsdoc/require-jsdoc": "off",
"jsdoc/require-param": "off",
"jsdoc/require-returns": "off",
"jsdoc/require-description": "off",
"jsdoc/require-param-type": "off",
"jsdoc/require-returns-description": "off"
}
}
]
}
30 changes: 0 additions & 30 deletions packages/gasket-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,36 +62,6 @@
"jsdom": "^20.0.3",
"typescript": "^5.7.3"
},
"eslintConfig": {
"ignorePatterns": [
"cjs/"
],
"extends": [
"godaddy",
"plugin:jest/recommended",
"plugin:jsdoc/recommended-typescript-flavor"
],
"plugins": [
"unicorn",
"jsdoc"
],
"rules": {
"unicorn/filename-case": "error"
},
"overrides": [
{
"files": [
"lib/*.ts"
],
"extends": [
"godaddy-typescript"
],
"rules": {
"jsdoc/*": "off"
}
}
]
},
"jest": {
"transform": {}
}
Expand Down
32 changes: 32 additions & 0 deletions packages/gasket-fetch/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"extends": [
"godaddy",
"plugin:jest/recommended",
"plugin:jsdoc/recommended-typescript-flavor"
],
"plugins": [
"unicorn",
"jsdoc"
],
"rules": {
"unicorn/filename-case": "error"
},
"overrides": [
{
"files": [
"lib/*.ts"
],
"extends": [
"godaddy-typescript"
],
"rules": {
"jsdoc/require-jsdoc": "off",
"jsdoc/require-param": "off",
"jsdoc/require-returns": "off",
"jsdoc/require-description": "off",
"jsdoc/require-param-type": "off",
"jsdoc/require-returns-description": "off"
}
}
]
}
Loading
Loading