mirror of
https://github.com/ivuorinen/base-configs.git
synced 2026-01-26 11:14:00 +00:00
feat!: module & commonjs in stylelint
BREAKING CHANGE: support module, and commonjs types
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
{
|
{
|
||||||
"extends": [
|
"extends": ["@ivuorinen/stylelint-config/css"]
|
||||||
"@ivuorinen/stylelint-config/css"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
2
packages/stylelint-config/css/index.mjs
Normal file
2
packages/stylelint-config/css/index.mjs
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
import config from './index.cjs'
|
||||||
|
export default config
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@ivuorinen/stylelint-config",
|
"name": "@ivuorinen/stylelint-config",
|
||||||
"version": "0.2.37",
|
"version": "0.2.37",
|
||||||
|
"type": "module",
|
||||||
"description": "ivuorinen's shareable configuration for stylelint.",
|
"description": "ivuorinen's shareable configuration for stylelint.",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Ismo Vuorinen",
|
"name": "Ismo Vuorinen",
|
||||||
@@ -12,10 +13,26 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 18"
|
||||||
},
|
},
|
||||||
|
"main": "css/index.cjs",
|
||||||
|
"module": "css/index.mjs",
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"import": "./css/index.mjs",
|
||||||
|
"require": "./css/index.cjs"
|
||||||
|
},
|
||||||
|
"./css": {
|
||||||
|
"import": "./scss/index.mjs",
|
||||||
|
"require": "./scss/index.cjs"
|
||||||
|
},
|
||||||
|
"./scss": {
|
||||||
|
"import": "./scss/index.mjs",
|
||||||
|
"require": "./scss/index.cjs"
|
||||||
|
}
|
||||||
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"css/index.js",
|
"css/*",
|
||||||
"scripts/*",
|
"scss/*",
|
||||||
"scss/index.js"
|
"scripts/*"
|
||||||
],
|
],
|
||||||
"homepage": "https://github.com/ivuorinen/base-configs/tree/main/packages/stylelint-config#readme",
|
"homepage": "https://github.com/ivuorinen/base-configs/tree/main/packages/stylelint-config#readme",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@@ -25,7 +42,6 @@
|
|||||||
"ivuorinen"
|
"ivuorinen"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "css/index.js",
|
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
},
|
},
|
||||||
@@ -34,7 +50,7 @@
|
|||||||
"url": "https://github.com/ivuorinen/base-configs.git"
|
"url": "https://github.com/ivuorinen/base-configs.git"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "node scripts/postinstall.js"
|
"postinstall": "node scripts/postinstall.cjs"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ivuorinen/config-checker": "^1.1.4",
|
"@ivuorinen/config-checker": "^1.1.4",
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
// noinspection NpmUsedModulesInstalled
|
||||||
const process = require('process')
|
const process = require('process')
|
||||||
const checkConfig = require('@ivuorinen/config-checker')
|
const checkConfig = require('@ivuorinen/config-checker')
|
||||||
const foundConfig = checkConfig('stylelint')
|
const foundConfig = checkConfig('stylelint')
|
||||||
2
packages/stylelint-config/scss/index.mjs
Normal file
2
packages/stylelint-config/scss/index.mjs
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
import config from './index.cjs'
|
||||||
|
export default config
|
||||||
Reference in New Issue
Block a user