diff --git a/package.json b/package.json index 8bafe0ed..d8858028 100644 --- a/package.json +++ b/package.json @@ -19,10 +19,10 @@ "publish": "lerna publish", "canary": "lerna publish --canary preminor --npm-tag alpha", "next": "lerna publish --bump prerelease --npm-tag next", - "lint": "eslint '**/*.{js,jsx}' --cache", - "lint:fix": "eslint '**/*.{js,jsx}' --fix --cache", - "lint:all": "eslint '**/*.{js,jsx}'", - "prettify": "prettier '**/*.{js,jsx,json,css,html,md}' --ignore-path .eslintignore --single-quote --write", + "lint": "eslint \"**/*.{js,jsx,ts,tsx}\" --cache", + "lint:fix": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix --cache", + "lint:all": "eslint \"**/*.{js,jsx,ts,tsx}\"", + "prettify": "prettier \"**/*.{js,jsx,ts,tsx,json,css,html,md}\" --ignore-path .eslintignore --single-quote --write", "precommit": "lint-staged", "test": "jest --onlyChanged", "test:all": "jest" diff --git a/packages/react-json-tree/.babelrc b/packages/react-json-tree/.babelrc index 33221413..b6f02798 100644 --- a/packages/react-json-tree/.babelrc +++ b/packages/react-json-tree/.babelrc @@ -1,7 +1,7 @@ { "presets": [ "@babel/preset-env", - "@babel/typescript", + "@babel/preset-typescript", "@babel/preset-react" ], "plugins": [ diff --git a/packages/react-json-tree/.eslintrc.js b/packages/react-json-tree/.eslintrc.js index 4605e602..31b014f0 100644 --- a/packages/react-json-tree/.eslintrc.js +++ b/packages/react-json-tree/.eslintrc.js @@ -3,7 +3,10 @@ module.exports = { parser: '@typescript-eslint/parser', parserOptions: { tsconfigRootDir: __dirname, - project: ['./tsconfig.json'] + project: ['./tsconfig.json'], + ecmaFeatures: { + jsx: true + } }, plugins: ['@typescript-eslint', 'react'], extends: [ diff --git a/packages/react-json-tree/package.json b/packages/react-json-tree/package.json index ba6b2d80..33e9f9f4 100644 --- a/packages/react-json-tree/package.json +++ b/packages/react-json-tree/package.json @@ -12,8 +12,8 @@ "build:js": "babel src --out-dir lib --extensions \".ts,.tsx\" --source-maps inline", "build:umd": "rimraf ./umd && webpack --progress --config webpack.config.umd.js", "build:umd:min": "webpack --env.minimize --progress --config webpack.config.umd.js", - "lint": "eslint . --ext .ts,.tsx", - "lint:fix": "eslint . --ext .ts,.tsx --fix", + "lint": "eslint . --ext .js,.jsx,.ts,.tsx", + "lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix", "test": "jest", "prepare": "npm run build", "prepublishOnly": "npm run test && npm run clean && npm run build && npm run build:umd && npm run build:umd:min", diff --git a/packages/react-json-tree/test/index.spec.js b/packages/react-json-tree/test/index.spec.jsx similarity index 100% rename from packages/react-json-tree/test/index.spec.js rename to packages/react-json-tree/test/index.spec.jsx