-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dependency @ota-meshi/eslint-plugin to ^0.11.0 (#37)
* Update dependency @ota-meshi/eslint-plugin to ^0.11.0 * format Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Yosuke Ota <otameshiyo23@gmail.com>
- Loading branch information
1 parent
022246d
commit 1e7c6fd
Showing
26 changed files
with
412 additions
and
425 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
"use strict" | ||
"use strict"; | ||
|
||
module.exports = { | ||
parserOptions: { | ||
sourceType: "script", | ||
ecmaVersion: 2020, | ||
}, | ||
extends: [ | ||
"plugin:@ota-meshi/recommended", | ||
"plugin:@ota-meshi/+node", | ||
"plugin:@ota-meshi/+json", | ||
"plugin:@ota-meshi/+yaml", | ||
"plugin:@ota-meshi/+prettier", | ||
], | ||
} | ||
parserOptions: { | ||
sourceType: "script", | ||
ecmaVersion: 2020, | ||
}, | ||
extends: [ | ||
"plugin:@ota-meshi/recommended", | ||
"plugin:@ota-meshi/+node", | ||
"plugin:@ota-meshi/+json", | ||
"plugin:@ota-meshi/+yaml", | ||
"plugin:@ota-meshi/+prettier", | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,51 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- name: Install Packages | ||
run: npm i --legacy-peer-deps | ||
- name: Lint | ||
run: npm run lint | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [12.x, 14.x, 16.x] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install Packages | ||
run: npm i --legacy-peer-deps | ||
- name: Test | ||
run: npm test | ||
test-old-vers: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14.x | ||
- name: Downgrade Packages | ||
run: | | ||
npm install --save-exact stylelint@14.0.0 --legacy-peer-deps | ||
npm install --save-exact stylelint-config-recommended@6.0.0 --legacy-peer-deps | ||
npx rimraf node_modules | ||
- name: Install Packages | ||
run: npm i --legacy-peer-deps | ||
- name: Test | ||
run: npm test | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- name: Install Packages | ||
run: npm i --legacy-peer-deps | ||
- name: Lint | ||
run: npm run lint | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [12.x, 14.x, 16.x] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install Packages | ||
run: npm i --legacy-peer-deps | ||
- name: Test | ||
run: npm test | ||
test-old-vers: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14.x | ||
- name: Downgrade Packages | ||
run: | | ||
npm install --save-exact stylelint@14.0.0 --legacy-peer-deps | ||
npm install --save-exact stylelint-config-recommended@6.0.0 --legacy-peer-deps | ||
npx rimraf node_modules | ||
- name: Install Packages | ||
run: npm i --legacy-peer-deps | ||
- name: Test | ||
run: npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
name: publish | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
push: | ||
tags: | ||
- "*" | ||
jobs: | ||
release: | ||
name: check version, and release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
- name: setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
registry-url: "https://registry.npmjs.org" | ||
- name: Install Packages | ||
run: npm i --legacy-peer-deps | ||
- name: test | ||
run: npm run test | ||
- name: check can npm-publish | ||
run: npx can-npm-publish | ||
- name: release | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
release: | ||
name: check version, and release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
- name: setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
registry-url: "https://registry.npmjs.org" | ||
- name: Install Packages | ||
run: npm i --legacy-peer-deps | ||
- name: test | ||
run: npm run test | ||
- name: check can npm-publish | ||
run: npx can-npm-publish | ||
- name: release | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
{ | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"json", | ||
"jsonc", | ||
"yaml" | ||
] | ||
"eslint.validate": ["javascript", "javascriptreact", "json", "jsonc", "yaml"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,55 @@ | ||
"use strict" | ||
"use strict"; | ||
|
||
const path = require("path") | ||
const path = require("path"); | ||
|
||
/** | ||
* Gets the module version from package name | ||
*/ | ||
module.exports = function getModuleVersion(...moduleNames) { | ||
const packageName = moduleNames.pop() | ||
const packageName = moduleNames.pop(); | ||
|
||
let ownerModuleRootPath = process.cwd() | ||
for (const ownerNames of moduleNames) { | ||
ownerModuleRootPath = | ||
getModuleRootPath(ownerNames, ownerModuleRootPath) || | ||
ownerModuleRootPath | ||
} | ||
try { | ||
const m = require("module") | ||
const relativeTo = path.join(ownerModuleRootPath, "__placeholder__.js") | ||
// eslint-disable-next-line node/no-unsupported-features/node-builtins -- ignore | ||
return m.createRequire(relativeTo)(`${packageName}/package.json`) | ||
.version | ||
} catch { | ||
// ignore | ||
} | ||
try { | ||
return require(`${packageName}/package.json`).version | ||
} catch { | ||
// ignore | ||
} | ||
let ownerModuleRootPath = process.cwd(); | ||
for (const ownerNames of moduleNames) { | ||
ownerModuleRootPath = | ||
getModuleRootPath(ownerNames, ownerModuleRootPath) || ownerModuleRootPath; | ||
} | ||
try { | ||
const m = require("module"); | ||
const relativeTo = path.join(ownerModuleRootPath, "__placeholder__.js"); | ||
// eslint-disable-next-line node/no-unsupported-features/node-builtins -- ignore | ||
return m.createRequire(relativeTo)(`${packageName}/package.json`).version; | ||
} catch { | ||
// ignore | ||
} | ||
try { | ||
return require(`${packageName}/package.json`).version; | ||
} catch { | ||
// ignore | ||
} | ||
|
||
return null | ||
} | ||
return null; | ||
}; | ||
|
||
/** | ||
* Get module root path | ||
*/ | ||
function getModuleRootPath(packageName, ownerModuleRootPath) { | ||
try { | ||
const m = require("module") | ||
const relativeTo = path.join(ownerModuleRootPath, "__placeholder__.js") | ||
try { | ||
const m = require("module"); | ||
const relativeTo = path.join(ownerModuleRootPath, "__placeholder__.js"); | ||
|
||
return path.dirname( | ||
// eslint-disable-next-line node/no-unsupported-features/node-builtins -- ignore | ||
m.createRequire(relativeTo).resolve(`${packageName}/package.json`), | ||
) | ||
} catch { | ||
// ignore | ||
} | ||
try { | ||
return path.dirname(require.resolve(`${packageName}/package.json`)) | ||
} catch { | ||
// ignore | ||
} | ||
return path.dirname( | ||
// eslint-disable-next-line node/no-unsupported-features/node-builtins -- ignore | ||
m.createRequire(relativeTo).resolve(`${packageName}/package.json`) | ||
); | ||
} catch { | ||
// ignore | ||
} | ||
try { | ||
return path.dirname(require.resolve(`${packageName}/package.json`)); | ||
} catch { | ||
// ignore | ||
} | ||
|
||
return null | ||
return null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
"use strict" | ||
"use strict"; | ||
|
||
module.exports = { | ||
overrides: [ | ||
{ | ||
files: ["*.vue", "**/*.vue"], | ||
extends: ["stylelint-config-recommended", "stylelint-config-html"], | ||
rules: require("./vue-specific-rules"), | ||
}, | ||
], | ||
} | ||
overrides: [ | ||
{ | ||
files: ["*.vue", "**/*.vue"], | ||
extends: ["stylelint-config-recommended", "stylelint-config-html"], | ||
rules: require("./vue-specific-rules"), | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
"use strict" | ||
"use strict"; | ||
|
||
const baseRules = require("./vue-specific-rules") | ||
const baseRules = require("./vue-specific-rules"); | ||
|
||
module.exports = { | ||
...baseRules, | ||
...(baseRules["function-no-unknown"] | ||
? { "function-no-unknown": null } | ||
: {}), | ||
} | ||
...baseRules, | ||
...(baseRules["function-no-unknown"] ? { "function-no-unknown": null } : {}), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
"use strict" | ||
"use strict"; | ||
|
||
const getModuleVersion = require("./get-module-version") | ||
const semver = require("semver") | ||
const stylelintVersion = getModuleVersion("stylelint") || "14.5.0" | ||
const getModuleVersion = require("./get-module-version"); | ||
const semver = require("semver"); | ||
const stylelintVersion = getModuleVersion("stylelint") || "14.5.0"; | ||
|
||
module.exports = { | ||
"selector-pseudo-class-no-unknown": [ | ||
true, | ||
{ | ||
ignorePseudoClasses: ["deep", "global"], | ||
}, | ||
], | ||
"selector-pseudo-element-no-unknown": [ | ||
true, | ||
{ | ||
ignorePseudoElements: ["v-deep", "v-global", "v-slotted"], | ||
}, | ||
], | ||
...(semver.gte(stylelintVersion, "14.5.0") | ||
? { | ||
"function-no-unknown": [true, { ignoreFunctions: ["v-bind"] }], | ||
} | ||
: semver.gte(stylelintVersion, "14.4.0") | ||
? { | ||
"function-no-unknown": null, | ||
} | ||
: {}), | ||
} | ||
"selector-pseudo-class-no-unknown": [ | ||
true, | ||
{ | ||
ignorePseudoClasses: ["deep", "global"], | ||
}, | ||
], | ||
"selector-pseudo-element-no-unknown": [ | ||
true, | ||
{ | ||
ignorePseudoElements: ["v-deep", "v-global", "v-slotted"], | ||
}, | ||
], | ||
...(semver.gte(stylelintVersion, "14.5.0") | ||
? { | ||
"function-no-unknown": [true, { ignoreFunctions: ["v-bind"] }], | ||
} | ||
: semver.gte(stylelintVersion, "14.4.0") | ||
? { | ||
"function-no-unknown": null, | ||
} | ||
: {}), | ||
}; |
Oops, something went wrong.