Skip to content

Commit

Permalink
Added ESLint for import/export syntax (#43)
Browse files Browse the repository at this point in the history
* Add eslint-plugin-import

* Remove rules for Jest
  • Loading branch information
compulim authored Sep 23, 2024
1 parent 01098f4 commit f4bfe5a
Show file tree
Hide file tree
Showing 23 changed files with 398 additions and 76 deletions.
43 changes: 43 additions & 0 deletions .eslintrc.production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
extends:
- plugin:import/recommended
plugins:
- import
rules:
import/no-deprecated: error
import/no-empty-named-blocks: error
import/no-extraneous-dependencies: error
import/no-mutable-exports: error
import/no-named-as-default: error
import/no-named-as-default-member: error
import/no-unused-modules: error
import/no-amd: error
import/no-commonjs: error
import/no-absolute-path: error
import/no-cycle: error
import/no-dynamic-require: error
import/no-self-import: error
import/no-useless-path-segments: error
import/no-webpack-loader-syntax: error
import/consistent-type-specifier-style:
- error
- prefer-inline
import/exports-last: error
import/extensions:
- error
- always
import/first: error
import/newline-after-import: error
import/no-anonymous-default-export: error
import/no-duplicates: error
import/no-namespace: error
import/no-unassigned-import: error
settings:
import/extensions:
- .cjs
- .mjs
- .js
- .jsx
- .cts
- .mts
- .ts
- .tsx
33 changes: 33 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ env:
browser: true
extends:
- eslint:recommended
# - plugin:import/recommended
overrides:
- extends: .eslintrc.react.yml
files:
- '**/*.jsx'
- '**/*.tsx'
- extends: .eslintrc.typescript.yml
files:
- '**/*.cts'
- '**/*.mts'
- '**/*.ts'
- '**/*.tsx'
Expand All @@ -31,10 +33,41 @@ overrides:
- '**/*.test.mts'
- '**/*.test.ts'
- '**/*.test.tsx'
- '**/test/**'
- extends: .eslintrc.production.yml
excludedFiles:
- '**/__tests__/**'
- '**/*.spec.cjs'
- '**/*.spec.mjs'
- '**/*.spec.js'
- '**/*.spec.jsx'
- '**/*.spec.cts'
- '**/*.spec.mts'
- '**/*.spec.ts'
- '**/*.spec.tsx'
- '**/*.test.cjs'
- '**/*.test.mjs'
- '**/*.test.js'
- '**/*.test.jsx'
- '**/*.test.cts'
- '**/*.test.mts'
- '**/*.test.ts'
- '**/*.test.tsx'
- '**/test/**'
files:
- '**/*.cjs'
- '**/*.mjs'
- '**/*.js'
- '**/*.jsx'
- '**/*.cts'
- '**/*.mts'
- '**/*.ts'
- '**/*.tsx'
parserOptions:
ecmaVersion: latest
sourceType: module
plugins:
# - import
- prettier
root: true
rules:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed

- Added ESLint import/export syntax, in PR [#XX](https://github.com/compulim/iter-fest/pull/XX)

## [0.2.1] - 2024-07-05

### Changed
Expand Down
Loading

0 comments on commit f4bfe5a

Please sign in to comment.