Skip to content
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
60 changes: 45 additions & 15 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,63 @@
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"plugins": [
"@typescript-eslint",
"simple-import-sort"
],
"parserOptions": {
"project": "tsconfig.json"
"project": "./tsconfig.json"
},
"root": true,
"ignorePatterns": [ "**/*.test.ts"],
"rules": {
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"object-curly-newline": ["error", {
"ImportDeclaration": {
"multiline": true
},
"ExportDeclaration": {
"multiline": true,
"minProperties": 3
}
}],
"no-useless-escape": "off",
"no-console": [ "error", { "allow": [ "error", "info" ] } ],
"no-tabs": "off",
"no-mixed-spaces-and-tabs": "error",
"semi": [ 2, "never" ],
"@typescript-eslint/no-unused-vars": [ "error", { "argsIgnorePattern": "^_" } ],
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/indent": ["error", 4, {
"FunctionDeclaration": {"parameters": "first"},
"FunctionExpression": {"parameters": "first"}
}],
"@typescript-eslint/no-use-before-define": ["error", {
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/indent": [ "error", 4, {
"FunctionDeclaration": { "parameters": "first" },
"FunctionExpression": { "parameters": "first" }
} ],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/no-use-before-define": [ "error", {
"variables": true,
"functions": true
}],
"no-case-declarations": "off",
"quotes": ["error", "single", {
} ],
"quotes": [ "error", "single", {
"allowTemplateLiterals": true
}],
"semi": [ "error", "never" ],
"camelcase": "off",
} ],
"array-bracket-spacing": [ "error", "always" ],
"comma-spacing": [ "error", { "before": false, "after": true } ],
"object-curly-spacing": [ "error", "always" ],
"space-unary-ops": [
2, {
"words": true,
"nonwords": true
}
],
"block-spacing": [ "error", "always" ],
"space-in-parens": [ "error", "always" ],
"max-lines": [ "error", { "max": 500, "skipBlankLines": true, "skipComments": true } ],
"max-lines-per-function": [ "error", 70 ],
"space-infix-ops": [ "error", { "int32Hint": true } ]
}
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
yarn.lock
yarn-error.log
package-lock.json
test-report.xml
tsconfig.tsbuildinfo
node_modules
dist
.env.dev
3 changes: 0 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testResultsProcessor: "jest-sonar-reporter",
// testMatch: [
// `src/__tests__/**/*.+(spec|test).+(ts|js)`
// ],
transform: {
'^.+\\.ts$': 'ts-jest'
},
Expand Down
29 changes: 18 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@juaji/scalars-cli",
"version": "1.2.22",
"description": "Client for scalars APIs",
"author": "LuisDanilo <luis.danilo.95@hotmail.com>",
"name": "@scalars/cli",
"version": "1.2.3",
"description": "Client for scalars application",
"license": "MIT",
"main": "dist/index.js",
"scripts": {
"prepublish": "yarn build",
"mkdir": "mkdir -p dist/templates",
"copy": "yarn run mkdir && cp src/utils/ScalarsClient.mustache dist/templates/ScalarsClient.mustache",
"build": "rimraf dist && tsc && rollup -c && rimraf dist/dts && yarn run copy",
"build": "rimraf dist && rollup -c && rimraf dist/dts && yarn run copy",
"test": "yarn build && node dist/sync.js && jest --detectOpenHandles --forceExit --testTimeout=540000",
"jest": "jest --testTimeout=540000 --runInBand"
},
Expand All @@ -19,32 +19,40 @@
"keywords": [
"scalars",
"sdk",
"scalars-cli",
"cli",
"graphql",
"serverless",
"baas",
"madrov"
],
"devDependencies": {
"@rollup/plugin-typescript": "^8.2.1",
"@types/inquirer": "^7.3.3",
"@types/inquirer-fuzzy-path": "^2.3.2",
"@types/jest": "^26.0.24",
"@types/mustache": "^4.1.1",
"@types/rollup__plugin-virtual": "^2.0.1",
"@typescript-eslint/eslint-plugin": "^4.28.1",
"@typescript-eslint/parser": "^4.28.1",
"child-process": "^1.0.2",
"eslint": "^7.29.0",
"eslint-plugin-simple-import-sort": "^7.0.0",
"jest": "^27.0.6",
"jest-sonar-reporter": "^2.0.0",
"rimraf": "^3.0.2",
"rollup-plugin-dts": "^3.0.2",
"rollup-plugin-terser": "^7.0.2",
"ts-jest": "^27.0.3",
"tslib": "^2.3.0",
"typescript": "^4.3.4"
"rollup": "^1.32.1",
"yargs": "^17.0.1"
},
"bin": {
"scalars": "dist/sync.js"
},
"repository": "https://gitlab.com/LuisDanilo/scalars-cli",
"repository": "https://github.com/scalars/cli",
"dependencies": {
"typescript": "^4.3.4",
"@apollo/client": "^3.3.21",
"@graphql-codegen/cli": "^2.0.1",
"@graphql-codegen/introspection": "^2.0.0",
Expand All @@ -53,13 +61,12 @@
"@types/node-fetch": "^2.5.11",
"dotenv": "^10.0.0",
"graphql": "^15.5.1",
"graphql-tag": "^2.12.5",
"inquirer": "^8.1.2",
"inquirer-fuzzy-path": "^2.3.0",
"mustache": "^4.2.0",
"node-fetch": "^2.6.1",
"react": "^17.0.2",
"tsc-prog": "^2.2.1",
"yargs": "^17.0.1",
"graphql-tag": "^2.12.5"
"tsc-prog": "^2.2.1"
}
}
6 changes: 0 additions & 6 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import typescript from '@rollup/plugin-typescript'
import dts from 'rollup-plugin-dts'
import { terser } from 'rollup-plugin-terser'

export default [
Expand All @@ -14,10 +13,5 @@ export default [
],
plugins: [typescript(), terser()],
external: ['dotenv', 'path', 'yargs', 'inquirer', '@graphql-codegen/cli', 'fs', 'mustache', 'tsc-prog', 'inquirer-fuzzy-path']
},
{
input: './dist/dts/index.d.ts',
output: [{ file: 'dist/index.d.ts', format: 'es' }],
plugins: [dts()]
}
]
Loading