🍰 Lint feature-sliced concepts by existing eslint plugins
feat:
(public-api) DangerousMode: Allow custom shared segments with _prefix by @Krakazybik in https://github.com/feature-sliced/eslint-config/pull/88
Use carefully and at your own risk
import { ... } from "shared/lib" // 🟩 valid import { ... } from "shared/library" // 🟥 not valid import { ... } from "shared/_library" // 🟩 again valid (as custom shared-segment)
feat:
(layer-slices) DangerousMode: Allow cross-imports for _prefix slices by @Krakazybik in https://github.com/feature-sliced/eslint-config/pull/95
Use carefully and at your own risk
import { ... } from "../HomePage"; import { ... } from "../ProfilePage"; // Imported into ... @path "pages/router" // 🟥 not valid (sibling slice) @path "pages/_router" // 🟩 again valid (as service directory/slice)
fix:
Incorrect sorting for layer root imports by @Krakazybik in https://github.com/feature-sliced/eslint-config/pull/94
Full Changelog: https://github.com/feature-sliced/eslint-config/compare/v0.1.0-beta.5...v0.1.0-beta.6
feat:
Alternative "public-api/lite" boundaries by @Krakazybik in https://github.com/feature-sliced/eslint-config/pull/87
Full Changelog: https://github.com/feature-sliced/eslint-config/compare/v0.1.0-beta.3...v0.1.0-beta.5
feat:
Experimental config - Import order alphabetic sort, spaces and reverted layers by @Krakazybik in https://github.com/feature-sliced/eslint-config/pull/84
Full Changelog: https://github.com/feature-sliced/eslint-config/compare/v0.1.0-beta.2...v0.1.0-beta.3
fix:
Impossible to disable rules by customized ruleIds by @Krakazybik in https://github.com/feature-sliced/eslint-config/pull/79
fix:
Wrong import order for aliased layers by @Krakazybik in https://github.com/feature-sliced/eslint-config/pull/81
fix:
No support alias in shared layer for PublicAPI by @Krakazybik in https://github.com/feature-sliced/eslint-config/pull/77
Full Changelog: https://github.com/feature-sliced/eslint-config/compare/v0.1.0-beta...v0.1.0-beta.2
Beta-testing usage ready version
Leave your feedback here
fix:
LINT-53: PublicAPI for {segment}.* files by @Krakazybik in https://github.com/feature-sliced/eslint-config/pull/54
chore:
GITHUB-46: PR creation template by @Krakazybik in https://github.com/feature-sliced/eslint-config/pull/56
feat:
LINT-47: Segment Public API by @Krakazybik in https://github.com/feature-sliced/eslint-config/pull/57
fix:
LINT-60: PublicAPI not allow global modules access by @Krakazybik in https://github.com/feature-sliced/eslint-config/pull/61
fix:
LINT-55: Wrong shared boundaries. by @Krakazybik in https://github.com/feature-sliced/eslint-config/pull/65
fix:
LINT-55: Incorrect import order working with aliases. by @Krakazybik in https://github.com/feature-sliced/eslint-config/pull/64
feat:
LINT-3: Custom messages plugin by @Krakazybik in https://github.com/feature-sliced/eslint-config/pull/68
Full Changelog: https://github.com/feature-sliced/eslint-config/compare/v0.1.0-alpha...v0.1.0-beta
Its our first "message" for feature-driven approach
You can see other planned solutions on org page
// Fail
import { Issues } from "pages/issues";
import { IssueDetails } from "features/issue-details"
import { Button } from "shared/components/button";
// Pass
import Routing from "pages"; // specific pages shouldn't be reexported
import { IssueDetails } from "features" // all features should be reexported, for usage
import { Button } from "shared/components"; // all components should be reexported, for usage
// Fail
import { Helper } from "./helpers";
import axios from "axios";
import { data } from "../fixtures";
import { Button } from "shared/components"
import { IssueDetails, RepoList } from "features"
import { debounce } from "shared/helpers"
// Pass
import axios from "axios"; // 1) external libs
import { IssueDetails, RepoList } from "features" // 2) features
import { Button } from "shared/components" // 3) shared/**
import { debounce } from "shared/helpers"
import { data } from "../fixtures"; // 4) parent
import { Helper } from "./helpers"; // 5) sibling
NOTE: Be sure, that your tsconfig allows you to use absolute imports
baseUrl: "./src"
// Fail
import Routing from "../../pages"
import { IssueDetails } from "../features";
import { Button } from "../shared/components";
// Pass
import Routing from "pages"
import { IssueDetails } from "features";
import { Button } from "shared/components";