From 9dd2162925ec5a85e9223e870e3ff4f2c0f07ff8 Mon Sep 17 00:00:00 2001 From: Huan Date: Wed, 17 Mar 2021 21:07:03 +0800 Subject: [PATCH 1/2] use .eslintrc.cjs --- .gitignore | 2 ++ bin/install.js | 6 +++--- package.json | 5 ++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 2676f60..7cd1918 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,5 @@ typings/ .next package-lock.json +t.* +t/ diff --git a/bin/install.js b/bin/install.js index e8ab592..4349777 100755 --- a/bin/install.js +++ b/bin/install.js @@ -5,7 +5,7 @@ const path = require('path') const pkgUp = require('pkg-up') -const ESLINTRC_YAML_CONTENT = ` +const ESLINTRC_CJS_CONTENT = ` const rules = { } @@ -23,11 +23,11 @@ async function main () { } const pkgDir = path.dirname(pkgFile) - const eslintRcJsFile = path.join(pkgDir, '.eslintrc.js') + const eslintRcJsFile = path.join(pkgDir, '.eslintrc.cjs') if (!fs.existsSync(eslintRcJsFile)) { console.info(`@chatie/eslint-config: auto generated ${eslintRcJsFile}`) - fs.writeFileSync(eslintRcJsFile, ESLINTRC_YAML_CONTENT) + fs.writeFileSync(eslintRcJsFile, ESLINTRC_CJS_CONTENT) } return 0 } diff --git a/package.json b/package.json index b2bed17..c625396 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,11 @@ { "name": "@chatie/eslint-config", - "version": "0.12.2", + "version": "0.13.0", "description": "ESLint Sharable Configurations and Rules in Chatie Organization", "main": "src/eslintrc.js", + "engines": { + "node": ">=12" + }, "scripts": { "dist": "echo dist", "pack": "npm pack", From e8ac51e1b404d9cde369fe4335a228c522001556 Mon Sep 17 00:00:00 2001 From: Huan Date: Wed, 17 Mar 2021 21:07:14 +0800 Subject: [PATCH 2/2] 0.13.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c625396..13fb451 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chatie/eslint-config", - "version": "0.13.0", + "version": "0.13.1", "description": "ESLint Sharable Configurations and Rules in Chatie Organization", "main": "src/eslintrc.js", "engines": {