diff --git a/.eslintrc b/.eslintrc index 85e752ff..5fa82f5a 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,44 +1,3 @@ { - "parser": "@typescript-eslint/parser", - "plugins": [ - "@typescript-eslint", - "eslint-comments", - "import", - "prettier", - "promise" - ], - "extends": [ - "airbnb-base", - "eslint:recommended", - "prettier", - "plugin:@typescript-eslint/recommended", - "plugin:import/errors", - "plugin:import/warnings", - "plugin:promise/recommended", - "plugin:prettier/recommended" - ], - "env": { - "es6": true, - "node": true, - "commonjs": true - }, - "parserOptions": { - "ecmaVersion": 2020, - "sourceType": "module", - "requireConfigFile": false - }, - "rules": { - "no-console":[2, { "allow": ["warn", "error"] }], - "no-nested-ternary": 0, - "import/extensions": 0, - "import/no-unresolved": 0, - "import/prefer-default-export": 0, - "no-param-reassign": [2, { "props": false }], - "prefer-destructuring": [2, {"object": true, "array": false}], - "@typescript-eslint/no-namespace": 0, - "@typescript-eslint/no-explicit-any": 0, - "@typescript-eslint/explicit-module-boundary-types": 0, - "@typescript-eslint/no-non-null-assertion": 0, - "no-prototype-builtins": 0 - } + "extends": "@bubkoo/eslint-config" } diff --git a/rollup.config.js b/rollup.config.js index 385dd199..c3f7f449 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,11 +1,6 @@ -import { terser } from 'rollup-plugin-terser' -import commonjs from '@rollup/plugin-commonjs' -import filesize from 'rollup-plugin-filesize' -import resolve from '@rollup/plugin-node-resolve' -import typescript from '@rollup/plugin-typescript' +import config from '@bubkoo/rollup-config' -export default { - input: './src/index.ts', +export default config({ output: [ { name: 'htmlToImage', @@ -14,11 +9,4 @@ export default { sourcemap: true, }, ], - plugins: [ - typescript({ declaration: false, module: 'ES6' }), - resolve(), - commonjs(), - terser(), - filesize(), - ], -} +}) diff --git a/tsconfig.json b/tsconfig.json index daed57ab..5a992506 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,27 +1,5 @@ { - "compilerOptions": { - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "declaration": true, - "removeComments": false, - "preserveConstEnums": true, - "esModuleInterop": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "noImplicitThis": true, - "noEmitOnError": true, - "strictNullChecks": true, - "noUnusedLocals": true, - "resolveJsonModule": true, - "experimentalDecorators": true, - "pretty": true, - "target": "es5", - "lib": [ - "dom", - "es2015" - ] - }, + "extends": "@bubkoo/tsconfig", "include": [ "src/**/*.ts" ]