Skip to content

Commit

Permalink
Add publint and eslint-plugin-import (#43)
Browse files Browse the repository at this point in the history
* Add publint and eslint-plugin-import

* Add entry
  • Loading branch information
compulim authored Oct 11, 2024
1 parent 95572f0 commit b920888
Show file tree
Hide file tree
Showing 13 changed files with 568 additions and 99 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
31 changes: 31 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ overrides:
- '**/*.tsx'
- extends: .eslintrc.typescript.yml
files:
- '**/*.cts'
- '**/*.mts'
- '**/*.ts'
- '**/*.tsx'
Expand All @@ -31,6 +32,36 @@ 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
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [`use-ref-from@0.1.0`](https://npmjs.com/package/use-ref-from/v/0.1.0)
- Updated pull request validation to test against various React versions, in PR [#33](https://github.com/compulim/message-port-rpc/pull/33)
- Moved from JSX Runtime to JSX Classic to support testing against React 16
- Added [ESLint import/export syntax](https://npmjs.com/package/eslint-plugin-import), in PR [#43](https://github.com/compulim/message-port-rpc/pull/43)
- Added [`publint`](https://npmjs.com/package/publint), in PR [#43](https://github.com/compulim/message-port-rpc/pull/43)

## [1.0.1] - 2023-10-09

Expand Down
Loading

0 comments on commit b920888

Please sign in to comment.