Skip to content

Releases: feature-sliced/eslint-config

v.0.1.0-beta: GodMode and other refinements

12 Feb 14:41
Compare
Choose a tag to compare

What's Changed

  • feat: (public-api) DangerousMode: Allow custom shared segments with _prefix by @Krakazybik in #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 #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 #94

Full Changelog: v0.1.0-beta.5...v0.1.0-beta.6

v.0.1.0-beta: less strict PublicAPI

07 Feb 05:15
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.1.0-beta.3...v0.1.0-beta.5

v.0.1.0-beta: import-order fixes

02 Feb 08:02
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.1.0-beta.2...v0.1.0-beta.3

v.0.1.0-beta: First patch

01 Feb 05:02
Compare
Choose a tag to compare

What's Changed

  • fix: Impossible to disable rules by customized ruleIds by @Krakazybik in #79
  • fix: Wrong import order for aliased layers by @Krakazybik in #81
  • fix: No support alias in shared layer for PublicAPI by @Krakazybik in #77

Full Changelog: v0.1.0-beta...v0.1.0-beta.2

v.0.1.0-beta

14 Jan 18:36
Compare
Choose a tag to compare

Beta-testing usage ready version

Leave your feedback here

Supported rules

CHANGELOG

Full Changelog: v0.1.0-alpha...v0.1.0-beta

v.0.1.0-alpha

23 Dec 19:23
ad905f2
Compare
Choose a tag to compare
v.0.1.0-alpha Pre-release
Pre-release

First prototype with base boundaries

Leave your feedback here

CHANGELOG

Hello, World!

10 Jan 20:01
cf9c5a7
Compare
Choose a tag to compare

Hello everyone!

Its our first "message" for feature-driven approach

You can see other planned solutions on org page

CHANGELOG

restrict imports (not private paths, only public API)
// 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
order imports (app > pages > features > shared > models)
// 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
use only absolute imports (relative - only for module internal using)

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";