Skip to content

Commit

Permalink
rename packages/ to configs/
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaciras committed Feb 17, 2024
1 parent 1c27b25 commit 6c3d8f2
Show file tree
Hide file tree
Showing 18 changed files with 24 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
module.exports = {
root: true,
extends: [
"./packages/core",
"./packages/typescript",
"./configs/core",
"./configs/typescript",
],
env: {
node: true,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/core/package.json → configs/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"repository": {
"type": "git",
"url": "git+https://github.com/Kaciras/eslint-config-kaciras.git",
"directory": "packages/core"
"directory": "configs/core"
},
"keywords": [
"eslint"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/jest/package.json → configs/jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"repository": {
"type": "git",
"url": "git+https://github.com/Kaciras/eslint-config-kaciras.git",
"directory": "packages/jest"
"directory": "configs/jest"
},
"keywords": [
"eslint",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/react/package.json → configs/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"repository": {
"type": "git",
"url": "git+https://github.com/Kaciras/eslint-config-kaciras.git",
"directory": "packages/react"
"directory": "configs/react"
},
"keywords": [
"eslint",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"repository": {
"type": "git",
"url": "git+https://github.com/Kaciras/eslint-config-kaciras.git",
"directory": "packages/typescript"
"directory": "configs/typescript"
},
"keywords": [
"eslint",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/vue/package.json → configs/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"repository": {
"type": "git",
"url": "git+https://github.com/Kaciras/eslint-config-kaciras.git",
"directory": "packages/vue"
"directory": "configs/vue"
},
"keywords": [
"eslint",
Expand Down
File renamed without changes.
22 changes: 7 additions & 15 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
packages:
- "plugin"
- "packages/*"
- "configs/*"
12 changes: 6 additions & 6 deletions tests/common.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ packages.forEach(({ name, plugins }) => {
*/
it("should add plugins from " + name, async () => {
const config = await getConfig("foobar.tsx", {
extends: "./packages/" + name,
extends: "./configs/" + name,
});

assert.strictEqual(config.plugins.length, plugins.length);
Expand All @@ -81,7 +81,7 @@ packages.forEach(({ name, plugins }) => {
* Check all rules in the config must change the rules of the base config.
*/
it("should not have redundant rules - " + name, async () => {
const { default: module } = await import(`../packages/${name}`);
const { default: module } = await import(`../configs/${name}`);

const { rules } = await getConfig("foobar.tsx", {
extends: module.extends,
Expand Down Expand Up @@ -113,7 +113,7 @@ it("should avoid conflict with typescript", async () => {
env: {
es2021: true,
},
extends: ["./packages/typescript"],
extends: ["./configs/typescript"],
});

const linter = new Linter();
Expand All @@ -124,9 +124,9 @@ it("should avoid conflict with typescript", async () => {
describe("vue + typescript", () => {
const config = {
extends: [
"./packages/core",
"./packages/typescript",
"./packages/vue/typescript",
"./configs/core",
"./configs/typescript",
"./configs/vue/typescript",
],
env: { es2021: true },
};
Expand Down
2 changes: 1 addition & 1 deletion tests/core.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Linter } from "eslint";
import { getConfig } from "./common.mjs";

const config = await getConfig("dummy.js",{
extends: ["./packages/core/index.js"],
extends: ["./configs/core/index.js"],
});

const linter = new Linter();
Expand Down
5 changes: 2 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
"compilerOptions": {
"target": "ESNext",
"lib": ["ESNext"],
"module": "CommonJS",
"moduleResolution": "Node",
"module": "ESNext",
"moduleResolution": "NodeNext",
"strict": true,
"sourceMap": true,
"esModuleInterop": true
}
}

0 comments on commit 6c3d8f2

Please sign in to comment.