Skip to content

Commit

Permalink
chore: fix build process
Browse files Browse the repository at this point in the history
  • Loading branch information
UncleClapton committed Mar 5, 2023
1 parent a6ad0b8 commit 769b332
Show file tree
Hide file tree
Showing 27 changed files with 192 additions and 192 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
overrides: [
{
files: '**/*.{js,mjs,cjs,jsx}',
extends: require.resolve('./packages/eslint-config/dist/index.js'),
extends: require.resolve('./dist/eslint-config/index.js'),
rules: {
'jsdoc/require-jsdoc': ['off'], // since we don't use jsdoc here
'no-magic-numbers': ['off'], // since defining a bunch of consts for lint rules is cumbersome
Expand All @@ -19,7 +19,7 @@ module.exports = {
},
{
files: '**/*.{ts,tsx}',
extends: require.resolve('./packages/eslint-config/dist/typescript.js'),
extends: require.resolve('./dist/eslint-config/typescript.js'),
rules: {
'jsdoc/require-jsdoc': ['off'], // since we don't use jsdoc here
'@typescript-eslint/no-magic-numbers': ['off'], // since defining a bunch of consts for lint rules is cumbersome
Expand Down
15 changes: 15 additions & 0 deletions .yarn/patches/@semantic-release-npm-npm-9.0.2-01eb854535.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/lib/publish.js b/lib/publish.js
index ff3af00789942572806e52627b5e22c8ac25d1b1..578d3fca85cdca973fd42ce05fc26b75a121e0b1 100644
--- a/lib/publish.js
+++ b/lib/publish.js
@@ -22,8 +22,8 @@ module.exports = async (npmrc, {npmPublish, pkgRoot}, pkg, context) => {
logger.log(`Publishing version ${version} to npm registry on dist-tag ${distTag}`);
const result = execa(
'npm',
- ['publish', basePath, '--userconfig', npmrc, '--tag', distTag, '--registry', registry],
- {cwd, env, preferLocal: true}
+ ['publish', '--userconfig', npmrc, '--tag', distTag, '--registry', registry],
+ {cwd: basePath, env, preferLocal: true}
);
result.stdout.pipe(stdout, {end: false});
result.stderr.pipe(stderr, {end: false});
1 change: 1 addition & 0 deletions common/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tsconfig.tsbuildinfo
File renamed without changes.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"@types/node": "^18.14.6",
"@typescript-eslint/eslint-plugin": "^5.52.0",
"@typescript-eslint/parser": "^5.52.0",
"copyfiles": "^2.4.1",
"doctoc": "^2.2.1",
"eslint": "^8.34.0",
"eslint-plugin-import": "^2.27.5",
Expand All @@ -73,5 +72,8 @@
"semantic-release-monorepo": "^7.0.5",
"typescript": "^4.9.5"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"resolutions": {
"@semantic-release/npm": "patch:@semantic-release/npm@npm%3A9.0.2#./.yarn/patches/@semantic-release-npm-npm-9.0.2-01eb854535.patch"
}
}
2 changes: 1 addition & 1 deletion packages/eslint-config-react/.releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[
"@semantic-release/npm",
{
"pkgRoot": "dist"
"pkgRoot": "../../dist/eslint-config-react"
}
],
"@semantic-release/github"
Expand Down
4 changes: 1 addition & 3 deletions packages/eslint-config-react/core/plugin-react-jsx.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { propertyMaxPerLine } from '@fuelrats/eslint-config/util/constants'

export = {
plugins: [
'react',
Expand Down Expand Up @@ -123,7 +121,7 @@ export = {
*/
'react/jsx-max-props-per-line': ['error', {
maximum: {
single: propertyMaxPerLine,
single: 5,
multi: 1,
},
}],
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-react/develop.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { sArg } from '@fuelrats/eslint-config/util/internal'
import { sArg } from './util/internal'

export = {
extends: [
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-react/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { sArg } from '@fuelrats/eslint-config/util/internal'
import { sArg } from './util/internal'

export = {
env: {
Expand Down
10 changes: 4 additions & 6 deletions packages/eslint-config-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"url": "https://github.com/UncleClapton"
},
"engines": {
"node": "^14.17.0 || >=16.0.0"
"node": ">=18.0.0"
},
"bugs": {
"url": "https://github.com/FuelRats/eslint-config-fuelrats/issues"
Expand Down Expand Up @@ -48,10 +48,10 @@
],
"main": "index.js",
"scripts": {
"clean": "rm -rf dist",
"build:copy": "copyfiles package.json LICENSE README.md dist",
"clean": "rm -rf ../../dist/eslint-config-react",
"build:prepare": "node ../../scripts/preparePackage.js eslint-config-react",
"build:compile": "tsc",
"build": "yarn run clean && yarn run build:compile && yarn run build:copy",
"build": "yarn run build:compile && yarn run build:prepare",
"lint": "eslint .",
"release": "yarn run build && semantic-release"
},
Expand All @@ -61,7 +61,6 @@
"@eslint-community/eslint-plugin-eslint-comments": "^3.2.1",
"@typescript-eslint/eslint-plugin": "^5.52.0",
"@typescript-eslint/parser": "^5.52.0",
"copyfiles": "^2.4.1",
"eslint": "^8.34.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsdoc": "^40.0.1",
Expand All @@ -76,7 +75,6 @@
"peerDependencies": {
"@babel/core": "^7.16",
"@babel/eslint-parser": "^7.16",
"@fuelrats/eslint-config": "^3",
"@typescript-eslint/parser": "^5",
"eslint": "^8.28",
"eslint-plugin-jsx-a11y": "^6.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-react/shared.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { sArg } from '@fuelrats/eslint-config/util/internal'
import { sArg } from './util/internal'

export = {
extends: [
Expand Down
5 changes: 2 additions & 3 deletions packages/eslint-config-react/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"./**/*",
],
"compilerOptions": {
"outDir": "./dist",
"baseUrl": "."
}
"outDir": "../../dist/eslint-config-react",
},
}
2 changes: 1 addition & 1 deletion packages/eslint-config-react/typescript.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { sArg } from '@fuelrats/eslint-config/util/internal'
import { sArg } from './util/internal'

export = {
extends: [
Expand Down
10 changes: 10 additions & 0 deletions packages/eslint-config-react/util/internal.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Creates a function that only passes the first argument to the given function
*
* @internal
*/
export const sArg = <T>(fn: (arg: T) => T) => {
return (arg: T, ..._: any[]) => {
return fn(arg)
}
}
5 changes: 2 additions & 3 deletions packages/eslint-config/.releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
[
"@semantic-release/npm",
{
"pkgRoot": "dist"
"pkgRoot": "../../dist/eslint-config"
}
],
"@semantic-release/github"
]
]
}
52 changes: 0 additions & 52 deletions packages/eslint-config/LICENSE

This file was deleted.

9 changes: 4 additions & 5 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"url": "https://github.com/UncleClapton"
},
"engines": {
"node": "^14.17.0 || >=16.0.0"
"node": ">=18.0.0"
},
"bugs": {
"url": "https://github.com/FuelRats/eslint-config-fuelrats/issues"
Expand Down Expand Up @@ -47,10 +47,10 @@
],
"main": "index.js",
"scripts": {
"clean": "rm -rf dist",
"build:copy": "copyfiles package.json LICENSE README.md dist",
"clean": "rm -rf ../../dist/eslint-config",
"build:prepare": "node ../../scripts/preparePackage.js eslint-config",
"build:compile": "tsc",
"build": "yarn run clean && yarn run build:compile && yarn run build:copy",
"build": "yarn run build:compile && yarn run build:prepare",
"lint": "eslint .",
"release": "yarn run build && semantic-release"
},
Expand All @@ -64,7 +64,6 @@
"@eslint-community/eslint-plugin-eslint-comments": "^3.2.1",
"@typescript-eslint/eslint-plugin": "^5.52.0",
"@typescript-eslint/parser": "^5.52.0",
"copyfiles": "^2.4.1",
"eslint": "^8.34.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsdoc": "^40.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"./**/*",
],
"compilerOptions": {
"outDir": "./dist",
"outDir": "../../dist/eslint-config",
},
}
21 changes: 0 additions & 21 deletions packages/eslint-plugin/LICENSE

This file was deleted.

3 changes: 1 addition & 2 deletions packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"url": "https://github.com/UncleClapton"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
"node": ">=18.0.0"
},
"bugs": {
"url": "https://github.com/FuelRats/eslint-config-fuelrats/issues"
Expand Down Expand Up @@ -56,7 +56,6 @@
"@babel/eslint-parser": "^7.19.1",
"@babel/plugin-proposal-export-default-from": "^7.16.7",
"@babel/preset-env": "^7.20.2",
"copyfiles": "^2.4.1",
"eslint": "^8.34.0",
"mocha": "^9.2.2",
"semantic-release": "^20.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

const rule = require('../../../lib/rules/default-export-matches-module-name')
const RuleTester = require('../../../util/RuleTester')
const RuleTester = require('../../util/RuleTester')

const externalNotMatchModuleNameError = (exportName, moduleName) => {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

const rule = require('../../../lib/rules/no-mixed-access-class-members')
const RuleTester = require('../../../util/RuleTester')
const RuleTester = require('../../util/RuleTester')

const noMixedError = (name, output) => {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RuleTester.setDefaultConfig({
sourceType: 'module',
ecmaVersion: 'latest',
babelOptions: {
configFile: require.resolve('../babel.config.js'),
configFile: require.resolve('./babel.config.js'),
},
},
})
Expand Down
File renamed without changes.
Loading

0 comments on commit 769b332

Please sign in to comment.