File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ It started as a fork of [`eslint-plugin-import`] using [`get-tsconfig`] to repla
28
28
- [ Configuration (new: ` eslint.config.* ` )] ( #configuration-new-eslintconfig )
29
29
- [ JS example] ( #js-example )
30
30
- [ Typescript example] ( #typescript-example )
31
+ - [ As a standalone ESLint plugin] ( #as-a-standalone-eslint-plugin )
31
32
- [ Configuration (legacy: ` .eslintrc* ` )] ( #configuration-legacy-eslintrc )
32
33
- [ TypeScript] ( #typescript )
33
34
- [ Rules] ( #rules )
@@ -139,6 +140,28 @@ export default [
139
140
> [ !NOTE]
140
141
> A complete list of available configuration can be found in [ config/flat folders] ( src/config/flat )
141
142
143
+ ### As a standalone ESLint plugin
144
+
145
+ ``` js
146
+ import { importX } from ' eslint-plugin-import-x'
147
+
148
+ export default [
149
+ {
150
+ plugins: {
151
+ ' import-x' : importX,
152
+ },
153
+ languageOptions: {
154
+ ecmaVersion: ' latest' ,
155
+ sourceType: ' module' ,
156
+ },
157
+ rules: {
158
+ ' import-x/no-dynamic-require' : ' warn' ,
159
+ ' import-x/no-nodejs-modules' : ' warn' ,
160
+ },
161
+ },
162
+ ]
163
+ ```
164
+
142
165
## Configuration (legacy: ` .eslintrc* ` )
143
166
144
167
> [ !TIP]
You can’t perform that action at this time.
0 commit comments