mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-30 17:37:09 +02:00
misc: convert all internal scripts to ESM (#6286)
* misc: convert all internal scripts to ESM * fixes * fix * fixes * fix! * complete eslint * more move * fix! * This looks better? * Final ones
This commit is contained in:
parent
bcc05e243f
commit
4fad1ce0cd
66 changed files with 412 additions and 374 deletions
|
@ -1,70 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const path = require('path');
|
||||
const rule = require('..');
|
||||
|
||||
const {ruleName, messages} = rule;
|
||||
|
||||
testStylelintRule(
|
||||
{
|
||||
// Relative to repo root.
|
||||
plugins: [path.join(process.cwd(), 'packages', 'stylelint-copyright')],
|
||||
rules: {
|
||||
[ruleName]: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
ruleName,
|
||||
fix: false,
|
||||
accept: [
|
||||
{
|
||||
code: `
|
||||
/**
|
||||
* Copyright
|
||||
*/
|
||||
|
||||
.foo {}`,
|
||||
},
|
||||
{
|
||||
code: `
|
||||
/**
|
||||
* copyright
|
||||
*/
|
||||
|
||||
.foo {}`,
|
||||
},
|
||||
],
|
||||
reject: [
|
||||
{
|
||||
code: `
|
||||
/**
|
||||
* Copyleft
|
||||
*/
|
||||
|
||||
.foo {}`,
|
||||
message: messages.rejected,
|
||||
line: 2,
|
||||
column: 1,
|
||||
},
|
||||
{
|
||||
code: `
|
||||
/**
|
||||
* Copyleft
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright
|
||||
*/
|
||||
.foo {}`,
|
||||
message: messages.rejected,
|
||||
line: 2,
|
||||
column: 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue