Update
This commit is contained in:
@ -87,12 +87,12 @@ index 4991f200..00000000
|
||||
- ],
|
||||
-}
|
||||
diff --git a/index.js b/index.js
|
||||
index 4140c6c8..792ceb4f 100644
|
||||
index 4140c6c8..03e623af 100644
|
||||
--- a/index.js
|
||||
+++ b/index.js
|
||||
@@ -1,15 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
@@ -1,31 +1,25 @@
|
||||
-'use strict';
|
||||
-
|
||||
-const configAll = require('./configs/all');
|
||||
-const configRecommended = require('./configs/recommended');
|
||||
-const configRuntime = require('./configs/jsx-runtime');
|
||||
@ -102,16 +102,47 @@ index 4140c6c8..792ceb4f 100644
|
||||
+import configRecommended from './configs/recommended';
|
||||
+import configRuntime from './configs/jsx-runtime';
|
||||
+import { name } from './package.json';
|
||||
+import allRules from './lib/rules';
|
||||
+export { default as rules } from './lib/rules';
|
||||
|
||||
// for legacy config system
|
||||
-const plugins = [
|
||||
- 'react',
|
||||
-];
|
||||
+const plugins = [name];
|
||||
+
|
||||
+export const deprecatedRules = configAll.plugins.react.deprecatedRules;
|
||||
|
||||
module.exports = {
|
||||
deprecatedRules: configAll.plugins.react.deprecatedRules,
|
||||
-module.exports = {
|
||||
- deprecatedRules: configAll.plugins.react.deprecatedRules,
|
||||
- rules: allRules,
|
||||
- configs: {
|
||||
- recommended: Object.assign({}, configRecommended, {
|
||||
- parserOptions: configRecommended.languageOptions.parserOptions,
|
||||
- plugins,
|
||||
- }),
|
||||
- all: Object.assign({}, configAll, {
|
||||
- parserOptions: configAll.languageOptions.parserOptions,
|
||||
- plugins,
|
||||
- }),
|
||||
- 'jsx-runtime': Object.assign({}, configRuntime, {
|
||||
- parserOptions: configRuntime.languageOptions.parserOptions,
|
||||
- plugins,
|
||||
- }),
|
||||
- },
|
||||
+export const configs = {
|
||||
+ recommended: Object.assign({}, configRecommended, {
|
||||
+ parserOptions: configRecommended.languageOptions.parserOptions,
|
||||
+ plugins,
|
||||
+ }),
|
||||
+ all: Object.assign({}, configAll, {
|
||||
+ parserOptions: configAll.languageOptions.parserOptions,
|
||||
+ plugins,
|
||||
+ }),
|
||||
+ 'jsx-runtime': Object.assign({}, configRuntime, {
|
||||
+ parserOptions: configRuntime.languageOptions.parserOptions,
|
||||
+ plugins,
|
||||
+ }),
|
||||
};
|
||||
diff --git a/lib/rules/button-has-type.js b/lib/rules/button-has-type.js
|
||||
index 204a33c4..01d992c2 100644
|
||||
--- a/lib/rules/button-has-type.js
|
||||
@ -253,7 +284,7 @@ index 55073bfe..efc07af1 100644
|
||||
const astUtil = require('./ast');
|
||||
const isCreateElement = require('./isCreateElement');
|
||||
diff --git a/package.json b/package.json
|
||||
index cb736434..a97113c0 100644
|
||||
index b1fa86fa..758b2177 100644
|
||||
--- a/package.json
|
||||
+++ b/package.json
|
||||
@@ -25,21 +25,13 @@
|
||||
@ -273,12 +304,12 @@ index cb736434..a97113c0 100644
|
||||
- "object.values": "^1.1.6",
|
||||
"prop-types": "^15.8.1",
|
||||
"resolve": "^2.0.0-next.4",
|
||||
- "semver": "^6.3.0",
|
||||
- "semver": "^6.3.1",
|
||||
- "string.prototype.matchall": "^4.0.8"
|
||||
+ "semver": "^6.3.0"
|
||||
+ "semver": "^6.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.21.0",
|
||||
"@babel/core": "^7.22.9",
|
||||
diff --git a/tsconfig.json b/tsconfig.json
|
||||
deleted file mode 100644
|
||||
index 39187b7f..00000000
|
||||
|
Reference in New Issue
Block a user